Cache Concept
The Cache concept uses the Cache Service Worker API. It lets you add your endpoints (or others) to the cache, and automatically caches media you upload with the Loader concept.
He doesn't manage your headers.
How it works
For activate the cache, go to your admin
(yourdomain.com/admin/wp-admin/admin.php?page=site-settings)
and click onExtra
tab, you'll seeCache version
andCache Expiration
. Version0
will disable your cache, just add a version.When you change the version, the previous cache is deleted.
Add in cache: For example, put a look on what we have do for get pages before we have server-side injecting:
Cache Concept works only on secure URLs.
It's ok to have Cache.get() even if cache don't work. It'll return the first parameter.
It's ok to have Cache.put() even if you don't need to do it, because the function will work only if the url is not on protocol blob: and if cache work.
You can use WordPress Hook like save_post with update_field of ACF for update your Cache version when a post is saved
Last updated