Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

3 views
Skip to first unread message

Michael M Slusarz

unread,
Apr 21, 2013, 11:49:58 PM4/21/13
to
Quoting Michael M Slusarz <slu...@horde.org>:

> commit 079141b6bce3ca747ce80592b628d5d8e9287ef6
> Author: Michael M Slusarz <slu...@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 [slu...@horde.org]

--
dev mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: dev-uns...@lists.horde.org

Jan Schneider

unread,
Apr 22, 2013, 5:28:26 AM4/22/13
to

Zitat von Michael M Slusarz <slu...@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
--
Jan Schneider
The Horde Project
http://www.horde.org/

Chuck Hagenbuch

unread,
Apr 22, 2013, 9:57:41 AM4/22/13
to
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

Jan Schneider

unread,
Apr 22, 2013, 10:17:28 AM4/22/13
to

Zitat von Chuck Hagenbuch <ch...@horde.org>:
FWIW, the default lifetime for *writing* the cache is 86400 seconds.
--
Jan Schneider
The Horde Project
http://www.horde.org/

Michael M Slusarz

unread,
Apr 22, 2013, 3:14:17 PM4/22/13
to
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 [slu...@horde.org]

0 new messages