Roundup Tracker - Issues

Message4690

Author rouilj
Recipients ber, lu_zero, rouilj
Date 2012-12-01.03:35:59
Message-id <1354332960.82.0.219722161736.issue2550702@psf.upfronthosting.co.za>
In-reply-to
The standard way to handle this is to add a caching mechanism to
the templating engine so we only have to grab the data from the
database via the ORM once per page creation.

 
http://pko.ch/2008/08/22/memoization-in-python-easier-than-what-it-should-be/

  http://wiki.python.org/moin/PythonDecoratorLibrary#Memoize

  https://bitbucket.org/zzzeek/dogpile.cache or

for Memoize with a timeout:  http://pypi.python.org/pypi/gocept.cache

The problem with this is we would have to delete the items
in the cache when they get changed in the database.
However I think every access to roundup opens the database
and should provide a consistent value for every access to
the database.

So if it can be added to the database get functions, the
cache gets destroyed when the database object is destroyed
which is at the end of every page view.

Replacing the ORM may be possible but one of the nice things about
the current ORM is that you can change the database simply by
changing the schema in the application without having to issue DDL
statements directly to the database (in SQL etc).
History
Date User Action Args
2012-12-01 03:36:00rouiljsetmessageid: <1354332960.82.0.219722161736.issue2550702@psf.upfronthosting.co.za>
2012-12-01 03:36:00rouiljsetrecipients: + rouilj, ber, lu_zero
2012-12-01 03:36:00rouiljlinkissue2550702 messages
2012-12-01 03:35:59rouiljcreate