Skip to content

Frank Goossens' blog

  • Web-Tech blogposts
  • Other blogposts
  • WordPress & plugins
    • WP YouTube Lyte
    • Autoptimize
    • WP DoNotTrack
    • Do Not Donate!
  • about
    • Timemachine
    • Contact

lyte cache

How to see WP YouTube Lyte’s cache for a post

April 27, 2015 by futtta

WP YouTube Lyte stores data it fetched from YouTube’s API in WordPress’s add_post_meta, thus avoiding to have to contact YouTube for subsequent requests. You can clear the entire cache by ticking that option on Lyte’s settings-page, but maybe you want to only remove the cache for one specific post or even fix a problem with a stale cache-entry?
In that case, this little code-snippet (to be used in a plugin or in your child theme’s functions.php) might help:

if (is_admin()) {
    add_filter( 'is_protected_meta', 'lyte_unprotect_meta', 10, 3);
}
function lyte_unprotect_meta($protected, $meta_key, $meta_type) {
    if (strpos($meta_key,"_lyte_")===0){
        return false;
    } else {
        return $protected;
    }
}

This little filter tells WordPress not to consider post_meta with a key that starts with “_lyte_” as protected, rendering it visible in the “Custom Fields” box on the “Post Edit”-screen. If this is active you can just edit your post, going to “Custom Fields” and removing the entry (or change it’s value, if you’re a guncompressing, base64_decoding hard-ass like that);
lyte_cache_in_custom_field-compressor_smaller-compressor

Categories howto, lang:en, wordpress, wp-youtube-lyte Tags custom field, lyte cache, post_meta 1 Comment

I am a "Web Performance and Architecture Consultant" from Belgium, working on Web and Mobile Architecture by day and WordPress and web performance by night (more info here).

  • subscribe to my web-tech blogfeed
  • abonneer op niet-technische artikels
  • @optimatters on Twitter
  • @futtta on fediverse (mastodon)
This is an ad-free blog!

You said, she said

  1. Daan van den Bergh on Ceremonies het monopolie van de (Katholieke) Kerk?
  2. Daan van den Bergh on Autoptimize Pro released, secret discount code here ;-)
  3. futtta on Ceremonies het monopolie van de (Katholieke) Kerk?
  4. Andrea on Ceremonies het monopolie van de (Katholieke) Kerk?
  5. Richard Korthuis on Mastodon oEmbed requests overload; use WP Rest Cache

Recent Blogposts

  • Eurovision 2023; my winner is … Blanca Paloma
  • Want to know some Autoptimize secrets?
  • Book bans won’t prevent mass shootings!
  • Autoptimize Pro 1.3; instant.page
  • How to fix Autoptimize & Critical CSS cron issue