You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 cached hal/json.
I could imagine a read-only field in the controller config which defaults to false and a cache service in the Hal plugin to support such functionality.
Is there any interest in a pull request for something like this for read-only resources.
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 .rest. in their name.
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.
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.
Originally posted by @Wilt at zfcampus/zf-hal#117
The text was updated successfully, but these errors were encountered: