Title: NextGEN Gallery template cache
Last modified: August 21, 2016

---

# NextGEN Gallery template cache

 *  Resolved [shauno](https://wordpress.org/support/users/shauno/)
 * (@shauno)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/nextgen-gallery-template-cache/)
 * Hi Guys
 * I see NGG is caching templates as transients (it seems, I haven’t dug too deep).
 * I need to be able to programmatically update the template cache, is this possible?
 * Just some info why I need to do this, if it matters: I am the author of NGG Voting.
   When a vote is cast on an image, I update the voting results with AJAX. But then
   when the users reloads the page, the cache is loaded, so it looks like their 
   vote hasn’t saved.
 * Thanks in advance.
 * [http://wordpress.org/plugins/nextgen-gallery/](http://wordpress.org/plugins/nextgen-gallery/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [shauno](https://wordpress.org/support/users/shauno/)
 * (@shauno)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/nextgen-gallery-template-cache/#post-4463418)
 * For anyone who comes across this, there are a few methods in the `C_Photocrati_Cache`
   class that can help:
 * `C_Photocrati_Cache::remove()` takes a transient id if you have it. Otherwise
   you can clear all cache of a specific group with `C_Photocrati_Cache::flush('
   displayed_gallery_rendering')` (where `'displayed_gallery_rendering'` is the 
   group you are trying to clear).

Viewing 1 replies (of 1 total)

The topic ‘NextGEN Gallery template cache’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * 1 reply
 * 1 participant
 * Last reply from: [shauno](https://wordpress.org/support/users/shauno/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/nextgen-gallery-template-cache/#post-4463418)
 * Status: resolved