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

8 REPLIES 8

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. Get Magento insight from
Magento 2 Blogs/Tutorial

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. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: Reindex and cache refreshing

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

Re: Reindex and cache refreshing

I have the same problem using redis cache and I can't find a solution. Could someone solve this problem?

Re: Reindex and cache refreshing

I've been reading thousands of forums since 2018. has never ever had any solution for anything.
He always answers in an amateur way.
of people know the answers you leave in the forums.

 

This issue is a Magento 2 bug. In my case, none of the indexers are running properly because we have over $130k products and indexers won't finish together. I MUST set up a separate cron job for each indexer. It works fine but it invalidates the cache every time the indexers run.

At this time, no body cares and there won't be a fix.
Most of Magento users have less than 1000 products. Magento is good for that, but not for a company that sells millions of products.

Re: Reindex and cache refreshing

Hi @matthew_onassis2

 

I've had the same issue, it took me about 16 hours to figure out.

If you still have the same issue can you run bin/magento indexer:reindex and share it's result.

 

@javier_moya @Foffo82 

 

 

Re: Reindex and cache refreshing

Hello @w3_Shaheer 

i hope you have the solution for that :

my reindex screenshot : https://ibb.co/sFCqZ4C

im using cron jobs &  page cache is invalidated after the "Category Products" index is reindexed.

 

Regards

Gabriel