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
/**
* By default use use 3600 seconds (1 hour) as cache lifetime
*/
if !fetch lifetime, cacheOptions["lifetime"] {
let lifetime = 3600;
}
if !fetch cacheService, cacheOptions["service"] {
let cacheService = "modelsCache";
}
let cache = this->container->getShared(cacheService);
lifetime var is never fetch from let cache = this->container->getShared(cacheService); after that.
So if we do not provide a lifetime with cacheOptions (in addition to key), lifetime is kept to 3600.
Questions? Forum: https://phalcon.io/forum or Discord: https://phalcon.io/discord
Describe the bug
Mvc\Model\Query does not use the modelsCache service lifetime.
In
cphalcon/phalcon/Mvc/Model/Query.zep
Line 289 in 83677f1
lifetime var is never fetch from
let cache = this->container->getShared(cacheService);
after that.So if we do not provide a lifetime with cacheOptions (in addition to key), lifetime is kept to 3600.
I started a conversation about that on discord : https://discord.com/channels/310910488152375297/310910488152375297/1337419685741723730
Some screenshots
And the documentation says : https://docs.phalcon.io/5.8/db-models-cache/#resultsets
Details
I can make a simple script to reproduce if needed and maybe provide a fix suggestion after having a better look at the source code
The text was updated successfully, but these errors were encountered: