• I manage a large WordPress Multisite installation and have recently received several reports of logo problems.

    In some cases, changes to the logo (Customizer -> Header > Logo) aren’t immediately visible on the front end. In others, removing the logo doesn’t reflect on the front end – even if the image is deleted from the Media Library, the theme still tries to render the (broken) image in the header.

    We run a persistent Memcached object cache, and I was able to detect that flushing this cache fixed the problems. With this info, I traced the problem to your logo cache in czr_fn_get_logo_atts(). The data being fetched from the persistent cache via wp_cache_get() is, in some instances, stale. I haven’t spent enough time to figure out how you intend to invalidate caches throughout the theme – I see a handful of calls to wp_cache_set(), but *none* to wp_cache_delete() – but a relatively straightforward fix is to invalidate anytime you save any theme setting, and allow the cache to be repopulated from the database.

    For the time being, I’ve manually modded the theme to bypass your call to wp_cache_get() in czr_fn_get_logo_atts().

    Thanks in advance for your attention to this issue.

Viewing 1 replies (of 1 total)
  • Theme Author presscustomizr

    (@nikeo)

    Hello,
    Thanks for raising this issue. You’re right, the theme is missing a cache cleaning mechanism when a persistent caching system like Memcache is used which overrides the default WP one (normally cleared on every page load)
    And I also agree that the solution to clear cache when updating theme settings is the best.
    This will be implemented in the next theme update.

Viewing 1 replies (of 1 total)
  • The topic ‘Logo settings cache not properly invalidated’ is closed to new replies.