Assuming weblog is a Weblog object, CacheManager.invalidate(weblog) will flush the cache for your weblog.
- Dave On Nov 28, 2007 3:50 PM, <[EMAIL PROTECTED]> wrote: > Thanks, it helps a lot. But I've got another related problem. > I'm able to get and set Cookie now. > In one page I set cookie in all others I'm reading it. But if I come back to > the first page and change the value of the cookie and go to the second page > and read it I'm still getting the old value until I flush cache of the blog. > Is any way to do this from the Model I've build? I'd like to flush cache at > the moment I set the cookie. > > > Thank you > Gene > > > ----- Original Message ---- > From: Dave <[EMAIL PROTECTED]> > To: [email protected] > Sent: Wednesday, November 28, 2007 12:28:01 AM > Subject: Re: What is the best way to add custom methodes > > Create a custom page model object with the method(s) you wish to add. > Here are some instructions I posted earlier: > > http://markmail.org/message/jdrk5jw4tg2ynkdp > > It is possible to get the Servlet API request object in a model, so > you can get headers, cookies, etc. > > - Dave > > > On Nov 27, 2007 11:17 AM, Evgeniy Strokin <[EMAIL PROTECTED]> wrote: > > Hello,.. I have such task: Our blog has many categories and subcategories. > > User should be able to choose some of them as default and I need to display > > posts only from those categories. > > So I thought I'll provide a screen where user can see the list of all > > categories and he can choose some. I'll store it in cookie. When next time > > user will come I'll read the cookie and show posts based on the values. > > I need to submit the form with user's choice to the server (right?) and set > > cookie. Also I need some kind of custom method which will read the cookie > > and return me list of categories. > > What is the best way to do this? > > Any suggestions are greatly appreciated. > > > > I use Roller 3.1 so far, but I have freedom to switch to Roller 4, but > > since it's not ready yet (I know, there is release soon,.. but I just > > tested RC10 and I still had problems there, may be just my config is wrong, > > may be problem with the RC, but this is not a good sine anyway) may be I'd > > need a solution for 3.1 first, and for 4.0 after.. > > > > Thank you, > > Gene
