persistant data

Brad Fitzpatrick brad at danga.com
Tue Sep 5 16:14:29 UTC 2006


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