-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support WP-API #19
Comments
Thanks for this issue! First and foremost, only the REST API infrastructure is being merged into WordPress 4.4. Endpoints are probably coming with 4.5 because they still need need some work. That means we don't need to hurry. Second, caching REST API requests is not as easy as it seems. There are lots of edge cases that need to be considered. I'm definitely keeping an eye on this to see how Cachify will fit into the whole picture. |
Another thing could be doing it the other way round: I have a node.js app using WP-API and caching the data by itself. I would love to have a unified action from Cachify that would fire each time the cache gets refreshed so that I could trigger a url in the node.js app that would also refresh the cache of the app from the API. Is there a possibility to do this? Could be a nice feature, because caching is not restricted to WordPress (where it's quite hard), but can be easily implemented in systems that use the API – the only thing that remains is the missing trigger when something is updated in WordPress. |
If there isn't already an action for that, we can definitely add one that is being run when the cache gets refreshed. Adding a custom endpoint for that sounds like something other developers should do themselves. |
This actions looks like what I was looking for: |
In the meantime, the REST-API has been in core for about 3 years now. It's quite simple to support the API by just hooking into the
Althought is looks so simple it does not make sense to me. Because Cachify does not support caching for Requests including GET Parameters we can only cache the basic endpoints without any query parameter. Even pagination works via a GET Parameter so we can only cache the first page of every request. When ever I used the WordPress REST-API, I used at least one GET parameter. For me caching the REST-API without supporting GET Parameters makes no sense. |
In fact that wp-api is being merged into wordpress core soon, you should add support for caching wp-api requests as soon as possible.
The text was updated successfully, but these errors were encountered: