You must delete key directly. I suggest you make global content separately cache, and make unique cache for each content.
Memcache taglibs have a cache admin servlet, you can set it in web.xml, and view the cache list. But when release, delete it. On 9月24日, 下午9时47分, vp <[EMAIL PROTECTED]> wrote: > Thanx !!! > > On Sep 24, 5:17 pm, "Boris Partensky" <[EMAIL PROTECTED]> > wrote: > > > This is described pretty well in FAQ: > > (http://www.socialtext.net/memcached/index.cgi?faq) > > > Namespaces > > > memcached does not support namespaces. However, there are some options to > > simulate them. > > Simulating Namespaces with key prefixes > > > If you simply want to avoid key colision between different types of data, > > simply prefix your key with a useful string. For example: "user_12345", > > "article_76890". > > Deleting by Namespace > > > While memcached does not support any type of wildcard deleting or deletion > > by namespace (since there are not namespaces), there are some tricks that > > can be used to simulate this. They do require extra trips to the memcached > > servers however. > > > Example, in PHP, for using a namespace called foo: > > > $ns_key = $memcache->get("foo_namespace_key"); > > > // if not set, initialize it > > if($ns_key===false) $memcache->set("foo_namespace_key", rand(1, 10000)); > > > $my_key = "foo_".$ns_key."_12345"; > > > To clear the namespace do: > > > $memcache->increment("foo_namespace_key"); > > > On Wed, Sep 24, 2008 at 7:40 AM, vp <[EMAIL PROTECTED]> wrote: > > > > Hey , can you tell me exactly how do you do the prepending > > > > On Sep 19, 7:46 pm, "Henrik Schröder" <[EMAIL PROTECTED]> wrote: > > > > I'm not familiar with the memcachedtaglib, but generally you cannot > > > delete > > > > groups of keys from memcached without knowing the exact key name. This > > > > is > > > a > > > > very common problem because you don't always know exactly what keys you > > > have > > > > created that belong to a certain group, you only know that you want to > > > > invalidate the whole group. > > > > > We solve this in our products by doing a double fetch, we store a prefix > > > > under the group name, and then all keys that belong to the group gets > > > this > > > > prefix prepended to them. If you then change the prefix for a group, you > > > > invalidate all the keys in that group. I have absolutely no idea if you > > > can > > > > do this with thetaglib(I'm guessing not), but it could perhaps be > > > > implemented as a feature of thetaglibitself? > > > > > /Henrik Schröder > > > > > On Fri, Sep 19, 2008 at 7:52 AM, vp <[EMAIL PROTECTED]> wrote: > > > > > > Hii, > > > > > > I am using the memcachedtaglib. most of the pages have pagination ie > > > > > the key is like topis_1 , topics_2 ... , so they all have a common > > > > > group Name "Topic" > > > > > > Whenever a new topic is added or deleted , i need to flush all the > > > > > cached pages in group Topic. > > > > > > i have added a flush tag on action : > > > > > > <cache:flush scope="application" groups="Topic"/> > > > > > > but this gives an error : > > > > > According to the TLD or the tag file, attribute key is mandatory for > > > > > tag flush > > > > > > How can this problem be resolved ? > > > > > > Any help will be appreciated . > > > > > > Thanking in advance . > > > -- > > --Boris
