Joose Vettenranta wrote:
Now I wanted to change it so certain pages are never served from the cache because they are dynamic. If I go the route you recommended I would have to write:
--------------------------
if ( live site request and one of the pages that we do not want to serve from cache) {
    // No cache. Generate.
    a lot of code right here that does the page generation
}
if ( live site request and cache copy of requested page exists ) {
    serve cache copy
}
// No cache. Generate.
a lot of code right here that does the page generation
--------------------------


It's not an option to use cocoon cache?

how about pseudo like this:

match ** {
 action (isPageCached) { serialize from cache }

 generate {
  generate...transform....
  match cached / or an action to see if page is cacheable {
    serialize to cache and browser
  }
  serialize to browser
 }
}

like this, no need to keep same code twice..

Also resources are nice things to make sitemap things easier...

- Joose

--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * [EMAIL PROTECTED] * +358 44 561 0270 *

I could possibly use Cocoon's cache but that is beside the point. This solution simply addresses this specific example and not the actual issue.

As I admitted there are ways to accomplish what I needed to do but they take more work than they should. Having the ability to negate matches and do ors would increase productivity by simplifying solutions and making xmap files to be easier to read. I am sure we would all agree that Cocoon should help speed up creation -- not slow it down.

I do like your idea of checking to see if the page should be cached instead of going my route of seeing if the cache should be used. Your way does seem much better but nevertheless it does seem I still need to be able to negate a match or write a customer action.

Thanks,
David



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to