I like the idea with unique keys, but the problem is I'm loading data
from memcached by nginx, so keys must be in format '$http_host
$request_uri'.

idea with re-caching data - I'm not caching all pages from all blogs,
on only that one visited in last 10h

On 2 Maj, 06:53, Abhinav Gupta <[email protected]> wrote:
> Hello,
> I think a easy way of doing this is, just have a unique key for each
> Blog(may be user-name) to be prefixed for each data stored in Memcache
> server, so when you need to flush the data for one particular Blog just
> change the prefixed key to something else (like user-name-v1) so from now
> onwords his old data got discarted and will get off from memory after it
> expires.
>
> Hope this will solve your problem.
> Regards,
>
>
>
> On Sat, May 2, 2009 at 4:22 AM, Les Mikesell <[email protected]> wrote:
>
> > maciejplonski wrote:
>
> >> Hello,
>
> >> I've got memcached installed on my VPS and also I've got there
> >> blogging platform. I'm caching whole pages in memcached and serving
> >> them by nginx. When one user posts sth, I need to flush whole
> >> memcached and delete from cache also other cached blogs.
>
> >> Is it possible to divide memcached to many 'blogs' and flush only
> >> cache from one blog so other blogs will be still served from
> >> memcached? This blogging platform is written in PHP.
>
> > If you know when and what you need to delete, why not just update the cache
> > instead and not break anything else?  Or, keep track of an update count
> > somewhere that you use in a key prefix so when a new post happens you just
> > stop using the old copies and they'll age out naturally.
>
> > --
> >   Les Mikesell
> >    [email protected]
>
> --
> ============================================================================================
>
> "The future belongs to those who believe in the beauty of their dreams"
> =============================================================================================
> Abhinav Gupta
> Software Engineer @99acres.com

Reply via email to