Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(2)  |  Derive(0)  |  Import(3)

src/e/r/erp5-HEAD/product/ERP5Type/Tool/CacheTool.py   erp5(Download)
from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5Type.Cache import DEFAULT_CACHE_FACTORY
from Products.ERP5Type.CachePlugins.RamCache import RamCache
from Products.ERP5Type.CachePlugins.DistributedRamCache import DistributedRamCache
 
    def getRamCachePlugin(cp):
      cp_meta_type = cp.meta_type
      id = cp.getCacheId()
      if cp_meta_type == 'ERP5 Ram Cache':
        return RamCache(id)

src/e/r/erp5-HEAD/product/ERP5Type/tests/testCacheTool.py   erp5(Download)
  def test_99_CachePluginInterface(self):
    """Test Class against Interface
    """
    from Products.ERP5Type.CachePlugins.DistributedRamCache import DistributedRamCache
    from Products.ERP5Type.CachePlugins.RamCache import RamCache

src/e/r/erp5-HEAD/product/ERP5Type/tests/testCache.py   erp5(Download)
 
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.CachePlugins.RamCache import RamCache
from Products.ERP5Type.CachePlugins.DistributedRamCache import\
                                              DistributedRamCache
  def afterSetUp(self):
    self.cache_plugins = (RamCache('ram_cache'),
                          DistributedRamCache('distributed_ram_cache',
                                              {'server': '127.0.0.1:11211',
                                               'debug_level': 7,