cancel
Showing results for 
Search instead for 
Did you mean: 

Reindex and cache refreshing

Reindex and cache refreshing

Hi,

I have some doubts about the correct behavior of the reindex and the cache refreshing:
I have two Magento 2 installations on 2 separate servers.
In the first installation after launching the magento indexer command: bin/magento indexer:reindex going into the backoffice I see the message:
One or more of the Cache Types are invalidated: Page Cache, Configuration. Please go to Cache Management and Refresh Cache Types.

 

In the second installation after launching the magento indexer command: bin/magento indexer:reindex the previous message does not appear


I wonder what the correct behavior is, do after the reindex is it necessary to flush the cache or not?

 

The 2 servers have the same setup: php7 - nginx and varnish cache

 

Thanks

4 REPLIES

Re: Reindex and cache refreshing

@Foffo82, Reindexing and Caching both terms have different purpose in Magento.

 

You dont need to run cache command when you are run indexing command.

 

From your point, One or more of the Cache Types are invalidated: Page Cache, Configuration. Please go to Cache Management and Refresh Cache Types.

 

This issue is not related to Indexing. This issue happened if you have changes some phtml file or layout file and want that latest changes in your server.

 

 

Its not necessary to flush cache after reindexing.

 

Please let me know if you have any query or concern regarding this.

 

If this response was helpful to you,consider giving kudos to this post.
If this response solved your problem, click accept as solution.

 

If Issue Solved, Click Kudos/Accept As solutions.

Re: Reindex and cache refreshing

Hi Rakesh thanks for your reply.

The installation that requires the cache refresh is a fresh installation of Magento 2.
I only have a test product, no extension, no theme.

So, as you say, the message:

One or more of the Cache Types are invalidated: Page Cache, Configuration. Please go to Cache Management and Refresh Cache Types.

should no longer appear.

For what reasons might it appear?

 

Re: Reindex and cache refreshing

@Foffo82 Because you have fresh setup, so first time you have to flush the cache, reindexing command.

If Issue Solved, Click Kudos/Accept As solutions.

Re: Reindex and cache refreshing

No, this happens every time I run bin / magento indexer: reindex