Cache Pagerfanta object or data #28
Closed
spointecker
started this conversation in
General
Replies: 1 comment
|
Assuming you are using Doctrine, you would be better off using its query caching features instead of trying to cache a Pagerfanta instance. The Pagerfanta class, and many of the adapters, are stateful classes that rely on data from a particular request and aren't really well suited to be cached themselves. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I tried to cache the pagerfanta result (the whole object
Pagerfanta) with Symfony cache and I am getting the following error:WARNING: Failed to save key "...." of type array.(I used caching via Symfony\Contracts\Cache\CacheInterface and Symfony\Contracts\Cache\ItemInterface).
Is there a way to cache the response of Pagerfanta?
Symfony: 4.4.16
PagerfantaBundle: 2.8.0
All reactions