使用PHP将数组存储在memcache中,数组元素在memcache中运行一段时间后会被取消设置

使用PHP将数组存储在memcache中,数组元素在memcache中运行一段时间后会被取消设置,php,arrays,memcached,Php,Arrays,Memcached,我正在memcache键“getBannerInfo”中保存一个包含29个元素的数组。该数组类似于: [bannerid] => 5059 [campaignid] => 2687 [contenttype] => png [storagetype] => url [filename] => [imageurl] => http://testanalyst.org/c2687/13381938962791_50x50.png [htmltemplate] =

我正在memcache键“getBannerInfo”中保存一个包含29个元素的数组。该数组类似于:

[bannerid] => 5059
[campaignid] => 2687
[contenttype] => png
[storagetype] => url
[filename] => 
[imageurl] => http://testanalyst.org/c2687/13381938962791_50x50.png
[htmltemplate] => 
[htmlcache] => 
[append] => 
[width] => 50
[height] => 50
[weight] => 1
[url] => http://www.google.com
[alt] => new image
[bannertext] => New image
[description] => test image alt text 23
[autohtml] => f
[alt_contenttype] => 
[comments] => 
[status] => 0
[compiledlimitation] => xyz
[acl_plugins] => lmn
[acls_updated] => 2012-05-28 16:49:02
[parameters] => N;
[custom_data] => abc
[target] => 
[capping] => 0
[block] => 0
[is_deleted] => 0
现在,我注意到一个奇怪的行为,虽然最初它是按预期设置的,但经过一段时间后,当它从memcache键获取数据时,altkey=>val对在获取的数组中不存在

我正在使用

 set($key,$arrayName,3600); and get($key)
Memcache扩展类的


为什么使用alt键会出现这种情况?具体来说,我最近添加到这个数组中的这个键,从那时起,这个问题就被注意到了

缓存只是一个临时缓冲区,如果空间不足或记录过期,它可以删除记录。这是预期的行为。如果需要持久性存储,请使用数据库。

由于数组存储为序列化字符串,因此整个字符串将被删除,而不仅仅是
alt
键。鉴于memcache存储数据的方式,我无法将此视为memcache问题。是否有可能将此数组减去alt键存储在代码中的其他位置?