Esempio n. 1
0
 def memcached_path(self, path='all', **post):
     return memcached.get_flush_page(memcached.get_keys(path=path),
                                     'Cached Pages Path %s' % path,
                                     '/mcpath?path=%s' % path,
                                     '/mcpath/delete?path=%s' % path)
Esempio n. 2
0
 def remove_cached_page(self, url='', **kw):
     memcached.mc_delete(memcached.get_keys(flush_type='page', path=url))
     return 'deleted'
Esempio n. 3
0
 def memcached_module(self, module='all', **post):
     return memcached.get_flush_page(memcached.get_keys(module=module),
                                     'Cached Pages Model %s' % module,
                                     '/mcmodule/%s' % module,
                                     '/mcmodule/%s/delete' % module)
Esempio n. 4
0
 def memcached_etag(self, etag='all', **post):
     return memcached.get_flush_page(
         memcached.get_keys(etag=etag,
                            load=True), 'Cached Pages Etag %s' % etag,
         '/mcetag/%s' % etag, '/mcetag/%s/delete' % etag)
Esempio n. 5
0
 def mc_delete_path(self,res_id):
     model_data = self.env['ir.model.data'].search([('model','=','ir.ui.view'),('res_id','=',res_id)],limit=1)
     if model_data and model_data.module == 'website':
         for key in memcached.get_keys(path='/page/%s' % model_data.name, db=self._cr.dbname):
             memcached.mc_delete(key) 
Esempio n. 6
0
 def memcached_clear_path(self, path='all', **post):
     memcached.mc_delete(memcached.get_keys(path=path))
     return request.redirect(path, code=302)
Esempio n. 7
0
 def memcached_flush(self, flush_type='all', **post):
     return memcached.get_flush_page(
         memcached.get_keys(flush_type=flush_type,
                            load=True), 'Cached Pages %s' % flush_type,
         '/mcflush/%s' % flush_type, '/mcflush/%s/delete' % flush_type)
Esempio n. 8
0
 def memcached_status_code_delete(self, status_code='all', **post):
     memcached.mc_delete(memcached.get_keys(status_code=status_code))
     return werkzeug.utils.redirect('/mcstatus/%s' % status_code, 302)
Esempio n. 9
0
 def memcached_status_code(self, status_code='all', **post):
     return memcached.get_flush_page(
         memcached.get_keys(status_code=status_code, load=True),
         'Cached Pages Status %s' % status_code,
         '/mcstatus/%s' % status_code, '/mcstatus/%s/delete' % status_code)
Esempio n. 10
0
 def memcached_path_delete(self, path='all', **post):
     memcached.mc_delete(memcached.get_keys(path=path))
     return werkzeug.utils.redirect('/mcpath?path=%s' % path, 302)
Esempio n. 11
0
 def memcached_module_delete(self, module='all', **post):
     memcached.mc_delete(memcached.get_keys(module=module))
     return werkzeug.utils.redirect('/mcmodule/%s' % module, 302)
Esempio n. 12
0
 def memcached_flush_delete(self, flush_type='all', **post):
     memcached.mc_delete(memcached.get_keys(flush_type=flush_type))
     return werkzeug.utils.redirect('/mcflush/%s' % flush_type, 302)