- π¦πΉAustria mathiasgmeiner
I have the same problem with caching. @brianperry can you direct me to your solution?
I'm attempting to create a resource that should rarely be cached (making it uncacheable would probably be reasonable.) My resource extends EntityResourceBase but I'm finding that the resource is cached pretty aggressively.
As a starting point, I'm trying to make the resource uncacheable, but am having no luck.
I've tried the no_cache option in routing.yml
options:
no_cache: TRUE
Within the process method on the class I've tried a number of things to make things uncacheable - making the response private, setting a max age of 0, even resorting the the kill switch :) Nothing seems to have an impact.
I'm taking this approach to building the response:
$data = $this->createIndividualDataFromEntity($entity);
$response = $this->createJsonapiResponse($data, $request);
Are there any examples out there that show how to override this caching? EntityQueryResourceBase seems to give more control over cacheability, but an entity query isn't really appropriate for this endpoint.
Closed: works as designed
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I have the same problem with caching. @brianperry can you direct me to your solution?