write() function in Cacheable class defines $ttl as *seconds* but it is actually *minutes*
A bug in 2.2.1, submitted by davidhund on 21 May 2011
Announcement
Symphony's issue tracker has been moved to Github.
Issues are displayed here for reference only and cannot be created or edited.
Browse
Closed#636: write() function in Cacheable class defines $ttl as *seconds* but it is actually *minutes*
Nope it looks like your absolutely correct, the $ttl
is minutes, not seconds. That'd be my mistake.
Thanks.
Would it note be better to actually change it to (the more conventional?), seconds?
I understand a code change like this will have a direct impact on running sites, but my guess is that many others mistakenly believe the current cache to be in seconds.
This issue is closed.
The
Cacheable
Class in lib/core/class.cacheable.php has awrite()
function that accepts a$ttl
parameter.The documentation defines this as seconds (line 40-41). On line 64 the user input is actually multiplied by 60:
The result is that when we try to cache something for a day, as so:
.. the
$ttl
will be((3600 * 24) * 60)
and the content will be cached for sixty days instead of one... Or am I overlooking something silly?