 tom
|
hi,
all other threads related to cache-plugins are clode, so i need a new one:
im running wp-supercache and everythings seems to work fine. gallery overview, gallery pages and slideviews are all cached.
my only problem: cache-files are not refreshed on update. the old version is online until a comment is written or i delete the coresponding cache-file manually. is there a way to do this on update? for comments it seems to work somehow!?
|
 Marcel
|
When a comment is writen wp-supercache automatically renews the cache.
I’ll dig into wp-supercache to find how you could renew the cache on a page update.
BTW, do you use LG permalinks and mod_rewrite to serve the cached pages?
|
 tom
|
hi marcel,
yes i’m using lg permalinks and mod_rewrite.
tom
|
 Marcel
|
The only hook available in LG 1.1 is the 'lazyest_image_found' filter, fired when a new image has been found in a folder.
I will add more hooks in version 1.2
The script below could rebuild the cache for the gallery like when a comment has been made.
function my_gallery_cache( $image ) {
global $lg_gallery;
$post_id = $lg_gallery->get_option( 'gallery_id' );
wp_cache_post_change( $post_id );
return $image;
}
add_filter( 'lazyest_image_found', 'my_gallery_cache' );
I will add more hooks in version 1.2
|
 tom
|
thank you marcel for this info. but on new comments the cache allready is refreshed.
i need some function to rebuild the cache when title, description or an extra field was changed by editor. so at this point when the captions.xml is updated.
btw: i did not realize before, the cache for the whole gallery is re-written when there is a new comment for the post-id of [lg_gallery]
so it almost makes no sense to cache the gallery when all cachefiles are rewritten x times a day when there is one more comment on my 1x.xxx fotos…
|
 Marcel
|
It still makes sense to cache the gallery because not every visitor is going to comment, do they?
The code above will reset the cache when a new image has been uploaded.
I’ll dig into wp-supercache to see how we can prevent resetting the cache for the whole gallery.
|