Closed andrzejdziekonski closed 8 years ago
Correct me if i am wrong: it is ok to cache whole object collection result (as above) with this bundle?
missclick with 'close'.
In order to store the data (in Memcache or any other cache) and retrieve it, it needs to be serialized and deserialized. This process kills some of the relations that the object has. If you want to test whether or not objects can sustain serialization and deserialization do (without caching):
$result = unserialize(serialize($query->getQuery()->getResult()));
If this does not work, you can not cache the data. Or to summarize:
Caching requires serialization and deserialization, if your data cannot sustain that, then you cannot cache it.
Hope that helps!
Closed due to inactivity
Hi, i am not sure where the problem is but i noticed that when i try to use extended fos user entity i retrieve from cache result which contains only entity base fields (my extended ones are null). I am doing it this way:
where setCache and getCache are my methods to write/read cache to memcache pool. When i clear cache i see all the information about article author, but when i check saved cache fields from extended fos user entity (firstname, lastname, image, slug) are nulls (in my entity declaration property variables are 'protected'). Anything i do wrong?
I tried to add fos_user entity manager in doctrine.result_cache
but it didnt work. When i remove whole memcache doctrine configuration i also dont see those entity properties in cache.