Loading ...
Sorry, an error occurred while loading the content.
 

Re: [Cheetahtemplate-discuss] [PATCH] #cache code generation

Expand Messages
  • Tavis Rudd
    Hi, I ve just tested the revised patch and committed it to the cvs. All the unit tests pass, but I d like to hear some reports back from people using
    Message 1 of 5 , Jul 9, 2005
      Hi,
      I've just tested the revised patch and committed it to the cvs. All the unit
      tests pass, but I'd like to hear some reports back from people using
      cheetah-caching in the wild before cutting a new release.

      Can I tempt anyone to update the relevant section in the Users' Guide? Also,
      does anyone here have caching usage examples / patterns they'd like to share?

      Cheers,
      Tavis


      On Sunday 26 June 2005 08:34, Philippe Normand wrote:
      > Hi,
      >
      > For what it's worth i've rewritten most of the Cheetah cache
      > management. The attached patch includes:
      >
      > - a new module : CacheRegion.py which adds two new classes (CacheRegion &
      > Cache)
      > - Compiler.{start,end}CacheRegion() methods rewritten
      > - Template.refreshCache() enhanced.
      >
      > So now, the cached data is stored in Cache instances which are
      > "contained" in CacheRegion instances. When you define a new #cache,
      > the compiler generates some code to add a new CacheRegion to the
      > Template._cacheRegions dictionary. Each CacheRegion stores at least one
      > Cache.
      >
      > If you add the keyword varyBy=$something to the #cache definition, the
      > CacheRegion will store as many Cache instances as necessary depending on
      > the value of $something (which can vary :)
      >
      > Caches and CacheRegions can be refreshed using the
      > Template.refreshCache() method. Ex:
      > myTemplate.refreshCache('someCacheRegionID', 'someCacheID') with:
      >
      > #def something
      > "someCacheID"
      > #end def
      > #cache id='someCacheRegionID', varyBy=$something
      > blah blah
      > #end cache
      >
      > Giving only one argument to refreshCache() will empty the whole cache
      > region.
      >
      > I've been using this patch for few days now and i'd be glad if others
      > could give feedback on it. It's been inpired by a previous patch from a
      > CherryPy team developer.
      >
      > Cheers,
      > Philippe


      -------------------------------------------------------
      This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
      July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
      core and dual graphics technology at this free one hour event hosted by HP,
      AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • Philippe Normand
      ... Hum, i can t see the CacheRegion.py file, seems like you forgot to add it ;) ... About examples, i can furnish one. I m using the #cache in a blog system.
      Message 2 of 5 , Jul 10, 2005
        Le 9/7/2005, "Tavis Rudd" <tavis@...> a écrit:

        >Hi,
        >I've just tested the revised patch and committed it to the cvs. All the unit
        >tests pass, but I'd like to hear some reports back from people using
        >cheetah-caching in the wild before cutting a new release.
        >

        Hum, i can't see the CacheRegion.py file, seems like you forgot to add
        it ;)

        >Can I tempt anyone to update the relevant section in the Users' Guide? Also,
        >does anyone here have caching usage examples / patterns they'd like to share?
        >

        About examples, i can furnish one. I'm using the #cache in a blog
        system. The Article.tmpl handles articles display (by id). So i have a
        cache per article id. I'll send some standalone code later on.

        Philippe


        -------------------------------------------------------
        This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
        July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
        core and dual graphics technology at this free one hour event hosted by HP,
        AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
        _______________________________________________
        Cheetahtemplate-discuss mailing list
        Cheetahtemplate-discuss@...
        https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      • Olivier FAVRE-SIMON
        Updating the docs is a very important part. Examples and use-cases (even simple ones) would be a very welcomed addition. I ve never made great use of the
        Message 3 of 5 , Jul 10, 2005
          Updating the docs is a very important part. Examples and use-cases (even
          simple ones) would be a very welcomed addition.

          I've never made great use of the caching system because I was not sure I
          fully understood all implications. So I chose slower but
          sure-to-be-up-to-date display.

          That's a pity because output caching is at least as important as
          template caching when most requests are queries to nearly static data (à
          la wiki).

          (and yes, thanks for your work. 0.9.17 is great)


          Tavis Rudd wrote:

          >Hi,
          >I've just tested the revised patch and committed it to the cvs. All the unit
          >tests pass, but I'd like to hear some reports back from people using
          >cheetah-caching in the wild before cutting a new release.
          >
          >Can I tempt anyone to update the relevant section in the Users' Guide? Also,
          >does anyone here have caching usage examples / patterns they'd like to share?
          >
          >Cheers,
          >Tavis
          >
          >
          >On Sunday 26 June 2005 08:34, Philippe Normand wrote:
          >
          >
          >>Hi,
          >>
          >>For what it's worth i've rewritten most of the Cheetah cache
          >>management. The attached patch includes:
          >>
          >>- a new module : CacheRegion.py which adds two new classes (CacheRegion &
          >>Cache)
          >>- Compiler.{start,end}CacheRegion() methods rewritten
          >>- Template.refreshCache() enhanced.
          >>
          >>So now, the cached data is stored in Cache instances which are
          >>"contained" in CacheRegion instances. When you define a new #cache,
          >>the compiler generates some code to add a new CacheRegion to the
          >>Template._cacheRegions dictionary. Each CacheRegion stores at least one
          >>Cache.
          >>
          >>If you add the keyword varyBy=$something to the #cache definition, the
          >>CacheRegion will store as many Cache instances as necessary depending on
          >>the value of $something (which can vary :)
          >>
          >>Caches and CacheRegions can be refreshed using the
          >>Template.refreshCache() method. Ex:
          >>myTemplate.refreshCache('someCacheRegionID', 'someCacheID') with:
          >>
          >>#def something
          >>"someCacheID"
          >>#end def
          >>#cache id='someCacheRegionID', varyBy=$something
          >>blah blah
          >>#end cache
          >>
          >>Giving only one argument to refreshCache() will empty the whole cache
          >>region.
          >>
          >>I've been using this patch for few days now and i'd be glad if others
          >>could give feedback on it. It's been inpired by a previous patch from a
          >>CherryPy team developer.
          >>
          >>Cheers,
          >>Philippe
          >>
          >>
          >
          >
          >-------------------------------------------------------
          >This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
          >July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
          >core and dual graphics technology at this free one hour event hosted by HP,
          >AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
          >_______________________________________________
          >Cheetahtemplate-discuss mailing list
          >Cheetahtemplate-discuss@...
          >https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
          >
          >
          >
          >
        • Tavis Rudd
          ... oops. fixed. ... This SF.Net email is sponsored by the Do More With Dual! webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the
          Message 4 of 5 , Jul 10, 2005
            On Sunday 10 July 2005 04:09, Philippe Normand wrote:
            > Le 9/7/2005, "Tavis Rudd" <tavis@...> a écrit:
            > >Hi,
            > >I've just tested the revised patch and committed it to the cvs. All the
            > > unit tests pass, but I'd like to hear some reports back from people using
            > > cheetah-caching in the wild before cutting a new release.
            >
            > Hum, i can't see the CacheRegion.py file, seems like you forgot to add
            > it ;)


            oops. fixed.


            -------------------------------------------------------
            This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
            July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
            core and dual graphics technology at this free one hour event hosted by HP,
            AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
            _______________________________________________
            Cheetahtemplate-discuss mailing list
            Cheetahtemplate-discuss@...
            https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
          Your message has been successfully submitted and would be delivered to recipients shortly.