Refresh cached album contents daily
-
Aloha @pavex,
We noticed that the html markup for the albums will get refreshed whenever the page the shortcode is embedded in gets updated (
save_post
hook).However, we have some users that frequently update their albums in Google, but rarely update their page in WordPress where the album is embedded. This means the embedded album gets stale, and does not show the latest version from Google.
Would it be possible to set an expiration on the transient that caches the album html? We suggest using the WordPress constant DAY_IN_SECONDS so the cache gets refreshed every 24 hours.
https://developer.www.ads-software.com/reference/functions/set_transient/Change line 102 of
pavex-embed-google-photos-album.php
to:
set_transient($transient, $html, DAY_IN_SECONDS);
- The topic ‘Refresh cached album contents daily’ is closed to new replies.