[dev] [commits] Horde branch master updated. 079141b6bce3ca747ce80592b628d5d8e9287ef6

Michael M Slusarz slusarz at horde.org
Mon Apr 22 19:14:17 UTC 2013


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Chuck Hagenbuch <chuck at horde.org>:
>
>> Quoting Jan Schneider <jan at horde.org>:
>>
>>> Zitat von Michael M Slusarz <slusarz at horde.org>:
>>>
>>>> Quoting Michael M Slusarz <slusarz at horde.org>:
>>>>
>>>>> commit 079141b6bce3ca747ce80592b628d5d8e9287ef6
>>>>> Author: Michael M Slusarz <slusarz at horde.org>
>>>>> Date:   Sun Apr 21 21:42:39 2013 -0600
>>>>>
>>>>> [mms] Fix storing schema information in Horde_Cache.
>>>>>
>>>>> About 99.9% sure we don't want cached schema information to have a
>>>>> lifetime of 1 second.  This was resulting in schema queries on every
>>>>> pageload.  Yikes.
>>>>>
>>>>> framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php      |    6 +++---
>>>>> framework/Db/lib/Horde/Db/Adapter/Postgresql/Schema.php |    4 ++--
>>>>> framework/Db/lib/Horde/Db/Adapter/Sqlite/Schema.php     |    6 +++---
>>>>> framework/Db/package.xml                                |    2 ++
>>>>> framework/Db/test/Horde/Db/Adapter/MysqlTest.php        |    8 ++++----
>>>>> framework/Db/test/Horde/Db/Adapter/Pdo/MysqlTest.php    |    8 ++++----
>>>>> framework/Db/test/Horde/Db/Adapter/Pdo/PgsqlTest.php    |    8 ++++----
>>>>> framework/Db/test/Horde/Db/Adapter/Pdo/SqliteTest.php   |    8 ++++----
>>>>> 8 files changed, 26 insertions(+), 24 deletions(-)
>>>>>
>>>>> http://git.horde.org/horde-git/-/commit/079141b6bce3ca747ce80592b628d5d8e9287ef6
>>>>
>>>> This fixes Horde_Db to work with the current state of Horde_Cache.
>>>>
>>>> But with that being said... to me it doesn't make a while heck of  
>>>> a lot of sense to have retrieval cache commands in Horde_Cache  
>>>> have a default lifetime of 1 second.  This pretty much makes  
>>>> caching a nullity since this data is not going to persists across  
>>>> a pageload.
>>>>
>>>> Maybe this is a historical requirement.  But in the absence of  
>>>> specific lifetime requested by calling code, the logical default  
>>>> behavior would seem to be to return the cache data if it exists.   
>>>> Not to mention that the default lifetime in the *drivers* is 0,  
>>>> not 1.
>>>>
>>>> michael
>>>>
>>>> ___________________________________
>>>> Michael Slusarz [slusarz at horde.org]
>>>
>>> Looks like this was intentional, but I agree, it doesn't make much sense:
>>> http://git.horde.org/diff.php/framework/Cache/Attic/Cache.php?rev=1.30&rt=horde&sa=1&r1=1.23&r2=1.24
>>
>> Sheesh, what was that guy thinking? :)
>>
>> Anyway, fwiw, I agree that 1 is a terrible default here. I probably  
>> was seeing an issue with no expire being the default, but if  
>> there's going to be a default of expire, it should probably be at  
>> least an hour or so. And no expire plus just changing the cache key  
>> when something changes, or explicitly invalidating, is probably a  
>> better strategy anyway.
>>
>> My two cents,
>> -chuck
>
> FWIW, the default lifetime for *writing* the cache is 86400 seconds.

The current issue is that changing the default value at the present  
time is not desirable, and not BC.  Probably isn't worth a version  
bump, at least right now.

Solution would be to mark the default value as deprecated and ensure  
that we are explicitly using the second argument in Horde code for the  
current releases.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list