Hi,
I'm building a new website using pyramid for the first time.
I have some experience with pylons and I'm finding some utilities I
was using with pylons are missing in pyramid.
Up till now I was able to reimplement most of what I needed, but I'm
having trouble understanding what is the right way
On 2010-12-11 16:10, Massimiliano Torromeo wrote:
I am already using the pyramid_beaker session factory, but there
doesn't seem to exist a beaker cache factory (or a valid alternative).
No factory is needed. Here is my recipe:
from beaker.util import parse_cache_config_options
import beake
I don't have a run.py.
Should I put it in the main function in __init__.py?
I tried my idea anyway, even if it didn't seem the correct way to do
it (I learned something at least), and it works:
# pyramid_beaker_cache/__init__.py
from beaker.cache import CacheManager
from beaker.util import parse_
Massimiliano,
I went down the same path of looking for a per-request caching middleware
that worked in the same way as the session middleware. Eventually I decided
caching was not tied to a single request in the same way as a session, so I
have a global cache as Wichert suggests.
Daniel
--
You
Sure. But such code shouldn't last for very long, because you needn't
support alpha releases of Pyramid forever.
- C
On Fri, 2010-12-10 at 15:41 -0800, Mike Orr wrote:
> On Thu, Dec 9, 2010 at 12:19 AM, Chris McDonough wrote:
> > As a result, the ``pyramid.configuration`` module has been depre
Hello,
it's looking just great!
How do you think, can this behavior be extracted into some pattern for
imperative configuration? I would like to have this in my toolchain in addition
to zope.configuration.
--
Andrey Popp
On Thursday, December 9, 2010 at 11:19 AM, Chris McDonough wrote:
On Sat, 2010-12-11 at 23:49 +0300, Andrey Popp wrote:
> Hello,
>
>
> it's looking just great!
>
>
> How do you think, can this behavior be extracted into some pattern for
> imperative configuration? I would like to have this in my toolchain in
> addition to zope.configuration.
Not sure.. I hav
Hi,
I tried the Wichert's configuration and declared my view --
@cache.cache_region('long_term')
def home_view(request):
but got an error --
File '/home/virtualenv/lib/python2.6/site-packages/Beaker-1.5.4-
py2.6.egg/beaker/cache.py', line 114 in cached
return cache[0].get_value(cache_key, cre