On Fri, Apr 30, 2010 at 9:27 PM, macm <[email protected]> wrote: > Hi Folks > > I am newbie in pylons and python > > How can I custom my cache_dir dynamically in controller? > > So I dont want use development.ini > cache_dir = %(here)s/data > > I want add in my controller something like that > > config['cache_dir'] = MyDynamicallyDir > > But after read a lot about wsgi and midlleware I see this: > config['pylons.app_globals'].mako_lookup = TemplateLookup( .... > > ... and I still lost! > > I am using mako and at this moment no sql. > > So is it possible custom config['cache_dir'] in controller? > How can I change config['cache_dir'] in controller? > Should I create a mako template base? and <%inherit something ?/> >
I guess you need to instantiate your own Cache http://beaker.groovie.org/modules/cache.html#beaker.cache.Cache self.cache = Cache(**kw) But maybe you can use cache_region instead > Regards > > macm > Mario > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/pylons-discuss?hl=en. > > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
