Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 5 by [email protected]: Dynamically save the templates to
cache
http://code.google.com/p/django-dbtemplates/issues/detail?id=5
What steps will reproduce the problem?
1. Activate template caching (no matter which one)
2. Edit a template and save it
3. Manually delete the cached item, or wait for garbage collection when
using django cache
4. Load a page, that uses this template
What is the expected output? What do you see instead?
I would expect, that the template is loaded once from db and then put into
the cache again. Instead it is loaded on every request again, as the cache
is filled only when the template is saved again.
Please provide any additional information below.
A small change to loader.py could solve the problem:
try:
template = Template.objects.get(name__exact=template_name,
sites__pk=settings.SITE_ID)
backend.save(template_name, template.content) <--- NEW
return (template.content, display_name)
except:
pass
raise TemplateDoesNotExist, template_name
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" 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/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---