persistant data
Evert|Rooftop
evert at rooftopsolutions.nl
Tue Sep 5 16:24:58 UTC 2006
Thanks, thats great advice.. The only thing that will change in the
session data is the 'last access time' for session expiry.. I guess I
could make the session 10 minutes longer and only update the database
when the last request before the current is older than 10 minutes..
This way I can also reduce writes.. thanks, just needed a heads up..
Evert
Brad Fitzpatrick wrote:
> Write sessions to both db and memcached.
> Read from memcached, if it's there, else db.
> Don't use -M.
>
> Most session data is read-mostly, anyway, so you still win.
>
> - Brad
>
> On Tue, 5 Sep 2006, Evert|Rooftop wrote:
>
>
>> Thanks, so there is no way to just mark a specific piece of data
>> persistent? I still want the usual cache features and 'older' cache
>> kicked out when theres not enough space, except session data..
>>
>> I don't mind losing the data, as this is only keeping temporary session
>> data.. worst case scenario users will have to login again..
>>
>> I guess I could just run another instance specific for this goal.. are
>> there any other solutions that you can advice to have cross-server
>> sessions, if you think this is not the best way to do this?
>>
>> Evert
>>
>> Brad Fitzpatrick wrote:
>>
>>> The -M option.
>>>
>>> But usual "memcached is not a database" warnings still apply. Computers
>>> crash.
>>>
>>> On Tue, 5 Sep 2006, Evert|Rooftop wrote:
>>>
>>>
>>>
>>>> Hi,
>>>>
>>>> I would really like to use memcached to store the users session data..
>>>> Im using the database for that now, because I need to retain the session
>>>> accross multiple servers.
>>>>
>>>> however, as the cache fills up it might delete 'older' data, so are
>>>> there plans to implement some sort of 'force persistant' flag that will
>>>> always retain the data, as long as the ttl is not expired?
>>>>
>>>> I'm using the PHP PECL api.
>>>>
>>>> Evert
>>>>
>>>>
>>>>
>>>>
>>>
>>
>
>
More information about the memcached
mailing list