Tagged: caching
Hi,
I’m experiencing an intermittent issue with Enfold’s dynamic CSS (specifically post.css) not being found on the frontend when using Redis as the WordPress object cache. Sometimes images do not load correctly, too.
Setup:
– Enfold theme (latest version)
– WP Rocket
– Redis object cache
As far as I can tell, Enfold stores CSS file metadata in WordPress options (avia_stylesheet_exists, avia_stylesheet_dynamic_version, etc.) and post meta (_av_css_styles), and these get cached in Redis.
When the CSS files are regenerated on disk, Redis still holds stale option values pointing to old file references or version strings, causing the mismatch.
Deleting the object cache manually solves the problem.
Is there a recommended approach to handle this? Is this a known issue with Enfold?
Thanks you in advance!
Hey Patrick,
What you are explaning is basically how caching is supposed to work, it’s supposed to serve the resources it has stored in cache. If something is changed in the theme options for example, then the Enfold style sheets will be regenerated, but not the files stored in cache. If you change images or anything related to styling, then a clearing of cache is necessary for it to show up on the frontend.
Best regards,
Rikard
