spotorm / spot2

Spot v2.x DataMapper built on top of Doctrine's Database Abstraction Layer
http://phpdatamapper.com
BSD 3-Clause "New" or "Revised" License
601 stars 101 forks source link

Disable query caching #242

Closed stojanovic-nikola closed 7 years ago

stojanovic-nikola commented 7 years ago

Is it possible and how, to tell mapper not to cache query?

$mapper->all(); // get data $mapper->all(); // get fresh data again

tuupola commented 7 years ago

Which cache do you mean? AFAIK Spot does not have a query cache.

vlucas commented 7 years ago

There is currently no caching: https://github.com/spotorm/spot2/blob/master/lib/Query.php#L630

Maybe your query is already executed and you just have the resulting collection in your variable?