manifest / performance / cache-collector
cache-collector
Dynamic cache key collector for easy purging
by Sean Fisher · github.com/alleyinteractive/cache-collector · website
★ 3stars
19composer installs
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/alleyinteractive/cache-collector/archive/refs/heads/develop.zipAlso on Packagist as alleyinteractive/cache-collector:
composer require alleyinteractive/cache-collectorFrom the readme
Cache Collector
Dynamic cache key collector for easy purging.
Background
One common problem with large WordPress sites that utilize Memcache is the
problems that arise when trying to purge cache keys that are dynamically
generated. For example, if a cache key is the hash of a remote request. You
would need to calculate the hashed cache key to properly purge it from the
cache. Another common problem would be trying to purge all the cache keys in a
specific group (Memcache doesn't support group purging).
Cache Collector solves this by storing cache/transient keys in collections.
These collections can then be purged in a single command. Here's a real-world
use case:
When viewing a post, the post's related posts are fetched from a remote source
and displayed to the user. This operation is expensive due to the remote request
and needs to be cached. When the post is updated, the related post cache needs
to be flushed as well.
Enter Cache Collector. When the post is updated, the related post cache key is
added to a collection. When the post is updated, the cache key that is connected
to the post will automatically be purged.
To flip this around, say the remote data source is having
Read the full README on GitHub →
Releases
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.