Title: Delete Object Cache (Memcache)
Last modified: September 9, 2016

---

# Delete Object Cache (Memcache)

 *  Resolved [sgatz](https://wordpress.org/support/users/sgatz/)
 * (@sgatz)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/delete-object-cache-memcache/)
 * Love this plugin, but one little bug, if you are using an external object cache(
   like APC or Memcache) and you look at your posts list and see a missing featured
   image, then you add one, the list still shows that you don’t have a featured 
   image (or if you change one it shows the old). This is due to caching. I created
   this simple function for my functions file to solve it. It’d be great if you 
   can integrate this into your code:
 * /***
    * * ADMIN: Clear cache for featured image column plugin when new featured
   image * only useful as long as featured image column plugin is active * could
   be a conditional to check if meta_key=_thumbnail_id, but figured the lookup isn’t
   worth it, just delete the cache on all post meta updates for a post * ****/
 * function fic_thumbnail_updated_actions($meta_id, $post_id) {
 *  $post_id = (int) $post_id;
    $cache_key = “featured_image_post_id-{$post_id}-
   _thumbnail”; $cache = wp_cache_delete( $cache_key, null );
 * }
    add_action( ‘deleted_post_meta’, ‘fic_thumbnail_updated_actions’, 10, 2 );
   add_action( ‘updated_post_meta’, ‘fic_thumbnail_updated_actions’, 10, 2 ); add_action(‘
   added_post_meta’, ‘fic_thumbnail_updated_actions’, 10, 2 );

The topic ‘Delete Object Cache (Memcache)’ is closed to new replies.

 * ![](https://ps.w.org/featured-image-column/assets/icon.svg?rev=3199603)
 * [Featured Image Column](https://wordpress.org/plugins/featured-image-column/)
 * [Support Threads](https://wordpress.org/support/plugin/featured-image-column/)
 * [Active Topics](https://wordpress.org/support/plugin/featured-image-column/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/featured-image-column/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/featured-image-column/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [sgatz](https://wordpress.org/support/users/sgatz/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/delete-object-cache-memcache/)
 * Status: resolved