Caching for django.contrib.sites

34 views
Skip to first unread message

Tom McKenzie

unread,
Dec 12, 2014, 7:57:21 PM12/12/14
to django...@googlegroups.com
Hello All

Is there a way to cache the database queries for django.contrib.sites?  We are running 1.4.15 at the moment and we planning to upgrade to 1.7.x soon.

Can I setup my own "custom" sites model with the same fields so I don't have to change the database table name?

I have been trying Cache machine with good success on our other models.  Ideally I would like to use it for the sites too.

Thanks,
Tom

Collin Anderson

unread,
Dec 14, 2014, 2:25:57 PM12/14/14
to django...@googlegroups.com
Hi Tom,

It should work to set up your own sites model with the same table name, as long as you can change all foreign keys to point to _your_ site model.

Are you actually using more than one site?

Collin

Tom McKenzie

unread,
Dec 15, 2014, 3:37:41 PM12/15/14
to django...@googlegroups.com
Thanks Colin, I'll give that a try.
Reply all
Reply to author
Forward
0 new messages