6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
9/19/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#13085] Use memcache instead of distributed hashtable in $conf[cache][driver]
*
Your Email Address
*
Spam protection
Enter the letters below:
__ .. .. .__. / ` ||_/ | | | \__.\__|| \|___|__\
Comment
>>> It is probably due to my limited command of the PHP language, but I >>> assumed that the below function would set $lifetime to '0' if the >>> parameter is not passed (similar to C++): >> >> No, you are correct in your logic, but this class is ONLY for >> memcache, not other cache drivers. As already stated, memcache >> doesn't use/need the lifetime parameter here so the default value of >> zero is irrelevant. > > This is how *every* cache driver is defined: > > /usr/share/php5/PEAR/Horde/Cache/Storage/Apc.php: public function > set($key, $data, $lifetime = 0) > /usr/share/php5/PEAR/Horde/Cache/Storage/Base.php: abstract public > function set($key, $data, $lifetime = 0); > /usr/share/php5/PEAR/Horde/Cache/Storage/Eaccelerator.php: public > function set($key, $data, $lifetime = 0) > /usr/share/php5/PEAR/Horde/Cache/Storage/File.php: public function > set($key, $data, $lifetime = 0) > /usr/share/php5/PEAR/Horde/Cache/Storage/Hashtable.php: public > function set($key, $data, $lifetime = 0) > /usr/share/php5/PEAR/Horde/Cache/Storage/Memcache.php: public > function set($key, $data, $lifetime = 0) > /usr/share/php5/PEAR/Horde/Cache/Storage/Memoryoverlay.php: public > function set($key, $data, $lifetime = 0) > /usr/share/php5/PEAR/Horde/Cache/Storage/Mock.php: public function > set($key, $data, $lifetime = 0) > /usr/share/php5/PEAR/Horde/Cache/Storage/Mongo.php: public > function set($key, $data, $lifetime = 0) > /usr/share/php5/PEAR/Horde/Cache/Storage/Null.php: public function > set($key, $data, $lifetime = 0) > /usr/share/php5/PEAR/Horde/Cache/Storage/Session.php: public > function set($key, $data, $lifetime = 0) > /usr/share/php5/PEAR/Horde/Cache/Storage/Sql.php: public function > set($key, $data, $lifetime = 0) > /usr/share/php5/PEAR/Horde/Cache/Storage/Stack.php: public > function set($key, $data, $lifetime = 0) > /usr/share/php5/PEAR/Horde/Cache/Storage/Xcache.php: public > function set($key, $data, $lifetime = 0) > > So if the $lifetime argument is not set (like in > Horde_Service_Weather) *every* cache driver will default to a value > of '0' and the data that is put into the cache by > Horde_Service_Weather will not be GC'ed for *any* cache driver. This > is the point I'm trying to make.
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers