An other alternative would be to store only the database-values in the cache
function loadResources()
{
// try cache
// if not available or ttl expired - load from database and store in
cache
}
function loadRoles()
{
[...etc]
Saves you space in the cache, deserialization
One potential option is caching the entire, constructed ACL object.
Simply invalidate the cache when any changes are made to ACL, and it will be
rebuilt on next request.
I'm sure you don't need the nitty gritty implementation details.
On 12/02/2009 8:53 AM, Robert Castley wrote:
Hi,
Could
= new My_Acl();
$cache-save('acl', $acl)
}
And if you make any changes to your ACL, simply invalidate the cached version.
-Original Message-
From: Jason Webster [mailto:ja...@intraffic.net]
Sent: 12 February 2009 17:07
To: Zend Framework - General
Subject: Re: [fw-general] Optimising
cannot serialize or
unserialize PDO instances' ...
I can't win :-)
- Robert
-Original Message-
From: Jason Webster [mailto:ja...@intraffic.net]
Sent: 12 February 2009 17:29
To: Zend Framework - General
Subject: Re: [fw-general] Optimising Zend_Acl
On 12/02/2009 9:12 AM, Robert
exception 'PDOException' with message 'You cannot serialize or
unserialize PDO instances' ...
I can't win :-)
- Robert
-Original Message-
From: Jason Webster [mailto:ja...@intraffic.net]
Sent: 12 February 2009 17:29
To: Zend Framework - General
Subject: Re: [fw-general] Optimising Zend_Acl