-
Notifications
You must be signed in to change notification settings - Fork 49
Support for read-only resources that are loaded from cache #117
Comments
I would be interested in seeing your solution. If done something similar, a ZF2 module that is listens for MvcEvents, can read&write to a Cache service and works with GET requests only on routes including I ran into a bug when reinjecting the modul from cache into the response (as described in #134) which I could not solve yet. As we use mostly plain JSON and not a HAL representation its not a show stopper, but if you find a way around that issue, I would be happy to see/test it and share some ideas. But I'am not sure that zf-hal is the right place for this. Caching should be implemented as a standalone module IMO. |
This repository has been closed and moved to laminas-api-tools/api-tools-hal; a new issue has been opened at laminas-api-tools/api-tools-hal#17. |
We have quite some resources in our application that are read-only. Those resources will render the same for each request which means once the
hal/json
response is rendered it could simply be stored in a cache and on the next request we skip a lot of overhead by returning the cachedhal/json
.I could imagine a
read-only
field in the controller config which defaults to false and a cache service in theHal
plugin to support such functionality.Is there any interest in a pull request for something like this for read-only resources.
The text was updated successfully, but these errors were encountered: