how can manage the contents in memcached server?
Alex Stapleton
alexs at advfn.com
Thu Sep 8 01:54:44 PDT 2005
I suggest you store an second key (e.g. simply append _status to the
one your actually storing data in or something) and then use that to
detect stale entries in the cache. Alternatively (and this is
probably the better way) is to have whatever it is which updates this
database also update the cache so that it is in sync with the
database and you no longer need to worry about stale cache entries.
On 8 Sep 2005, at 03:15, jzz wrote:
> Alex Stapleton,您好!
>
> ok,i will explain what i had meet in this case:
>
> i have more than 500 thousands records in my Db.it still keeps
> increasing now.
>
> my app must get the datas synchronously with DB,if i select
> from Db directly,the speed is very slowly even if i had try to
> optimize my Db for querying.
>
> the datas i need is not a single record i storing in Db.it's a
> collection with my datas by some regular rules,the size of one
> collection will not be little.my be 10K-50K
>
> i want store these collections in MemCache.they are not
> arranged in one array,they are separate from eache others.every
> collections has one key to be stored themself in MemCache. soch as
> this:cache_001,Cache_002,Cache_003 ,etc.
>
> these collections keep be synchronously by my data in DB.if i
> insert,delete,update any record to my Db,i will refresh the
> synchronous collection in MemCache.if i can do it,i will reduce the
> selecting times with my poor DB.
>
> so,now it's the point,cause i could store more than 10
> thousands collections in MemCache,it means i will arrange 10
> thousands keys to these collections at least.i want know whether
> the collection just refreshed has been stored in MemCache
> exactly.if it does,i will update it in MemCache,if it not,i will
> use a new key to store the collection.
>
> i want get all the keys directly ,but,i can't.it's what i
> could do that i only use some solutions like INDEX with Db tables
> to search my keys.
>
> that's all,thanks.:)
>
>
>
> ======= 2005-09-07 23:23:29 您在来信中写道:=======
>
>
>> No. Your application should be capable of handling cache misses for
>> you and memcached will cycle things out of memory if it starts to run
>> out, unless you configure it not to of course. There is no need to
>> manage the data that it stores. Unless you have a reason? In which
>> case you should explain it fully so that we can help you.
>>
>> On 7 Sep 2005, at 16:17, 张进 wrote:
>>
>>
>>> David Phillips,您好!
>>>
>>> no,i just want manager my data stored in memcache
>>>
>>> if u have more than 10 thousands records in Memcache,and the
>>> datas need be synchronously with DB, u will be same as me.....trust
>>> me.
>>>
>>> ======= 2005-09-07 22:10:23 您在来信中写道:=======
>>>
>>>
>>>
>>>> On 9/6/05, jzz <jzz_zh at 163.com> wrote:
>>>>
>>>>
>>>>> i find there is a problem about manageing the real
>>>>> contents i store in
>>>>> memcached server:i need a list of the keys .the keys i used to
>>>>> map my
>>>>> contents in server.
>>>>> sadly.i find no existing api i can use.i want use the api
>>>>> to know all the
>>>>> keys i used.
>>>>> so,i have to use other array which is a list to record
>>>>> the key i used.
>>>>> this array is like the function of index to Databace.
>>>>>
>>>>>
>>>>
>>>> memcached is a CACHE, not a database. It sounds like you want a
>>>> database.
>>>>
>>>> --
>>>> David Phillips <david at acz.org>
>>>> http://david.acz.org/
>>>>
>>>>
>>>
>>> = = = = = = = = = = = = = = = = = = = =
>>>
>>>
>>> 致
>>> 礼!
>>>
>>>
>>> 张进
>>> jzz_zh at 163.com
>>> 2005-09-07
>>>
>>>
>>>
>
> = = = = = = = = = = = = = = = = = = = =
>
>
> 致
> 礼!
>
>
> jzz
> jzz_zh at 163.com
> 2005-09-08
>
>
More information about the memcached
mailing list