Example #1
0
    def _flush_cache(self):
        """ Don't do any actual fancy deletions; just change the cache prefix """
        if hasattr(cache, "flush_all"):
            cache.flush_all()
        else:
            # Best effort to clear out everything anyway
            dump_all_caches()

            from esp import settings
            settings.CACHE_PREFIX = ''.join( random.sample( string.letters + string.digits, 16 ) )
            from django.conf import settings as django_settings
            django_settings.CACHE_PREFIX = settings.CACHE_PREFIX
Example #2
0
    def POST(self):
        old_theme=self.blog.theme_name
        str_options= self.param('str_options').split(',')
        for name in str_options:
            value=self.param(name)
            setattr(self.blog,name,value)

        bool_options= self.param('bool_options').split(',')
        for name in bool_options:
            value=self.param(name)=='on'
            setattr(self.blog,name,value)

        int_options= self.param('int_options').split(',')
        for name in int_options:
            try:
                value=int( self.param(name))
                setattr(self.blog,name,value)
            except:
                pass
        float_options= self.param('float_options').split(',')
        for name in float_options:
            try:
                value=float( self.param(name))
                setattr(self.blog,name,value)
            except:
                pass


        if old_theme !=self.blog.theme_name:
            self.blog.get_theme()


        self.blog.owner=self.login_user
        self.blog.author=self.blog.owner.nickname()
        self.blog.save()
        vals={'themes':ThemeIterator()}
        memcache.flush_all()
        self.render2('views/admin/setup.html',vals)
Example #3
0
def flush_all():
    memcache.flush_all()
Example #4
0
 def action_cacheclear(self):
     memcache.flush_all()
     self.write(_('"Cache cleared successful"'))