diff options
author | matthew <matthew> | 2008-10-10 15:44:49 +0000 |
---|---|---|
committer | matthew <matthew> | 2008-10-10 15:44:49 +0000 |
commit | 50e4a4f3a7a55bb79a6933cf07f9e80dfe87e4fd (patch) | |
tree | b6a89f95c5e92d144fbb39cedb7802fb2c7065e4 /perllib/Page.pm | |
parent | d071d83959fcf47a870ac5ac7ac107ca583b2ff1 (diff) |
Different memcached namespace per site.
Diffstat (limited to 'perllib/Page.pm')
-rw-r--r-- | perllib/Page.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm index 1f575bc11..6ea00db5d 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: Page.pm,v 1.117 2008-10-10 13:38:14 matthew Exp $ +# $Id: Page.pm,v 1.118 2008-10-10 15:44:49 matthew Exp $ # package Page; @@ -21,6 +21,8 @@ use LWP::Simple; use Digest::MD5 qw(md5_hex); use POSIX qw(strftime); use URI::Escape; + +use Memcached; use Problems; use Utils; use mySociety::Config; @@ -34,6 +36,7 @@ use mySociety::PostcodeUtil; use mySociety::Tracking; use mySociety::WatchUpdate; use mySociety::Web qw(ent NewURL); + BEGIN { mySociety::Config::set_file("$FindBin::Bin/../conf/general"); } @@ -92,6 +95,8 @@ sub microsite { if ($q->{site} eq 'scambs') { Problems::set_site_restriction('scambs'); } + + Memcached::set_namespace($q->{site}); } =item header Q [PARAM VALUE ...] |