Comments (2)
Hi @thame,
Please, use the filter rest_cache_timeout
to change the duration of cache.
How to use:
add_filter( 'rest_cache_timeout', function( $timeout ) {
// https://codex.wordpress.org/Easier_Expression_of_Time_Constants
return MONTH_IN_SECONDS;
} );
https://github.com/airesvsg/wp-rest-api-cache/blob/master/class-wp-rest-cache.php#L61
Thanks
from wp-rest-api-cache.
Thanks for the help!
from wp-rest-api-cache.
Related Issues (20)
- Uncaught Exception: Serialization of 'Closure' is not allowed HOT 11
- Clear cache on post update HOT 1
- Cache is not getting Updated after post publish HOT 3
- Cache producing wrong result when caching Custom Post Types with _embed option HOT 3
- Object Cache support missing
- POST requests have cache ! HOT 4
- Setting Content-Length HOT 1
- Request: Add cache cleared callback hook
- Last-Modified or ETag header
- Incompatible with Gutenberg HOT 4
- Core's return true function
- Doesn't work as expected with WooCommerce enabled HOT 2
- Custom routes permission_callback is ignored once the route is cached
- Is this just browser-level caching? HOT 1
- not working with WP REST API V2 HOT 6
- not work for endpoint with _embed HOT 3
- Enabled but no time difference HOT 1
- Clear cache HOT 1
- Embedded Media is not cached properly HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-rest-api-cache.