source: products/quintagroup.transmogrifier/branches/plone-2.1/quintagroup.transmogrifier/quintagroup/transmogrifier/flushcache.txt @ 1380

Last change on this file since 1380 was 1380, checked in by piv, 14 years ago

add section to flush zope database cache

File size: 1.1 KB
Line 
1Flush cache section
2===================
3
4A flushcache pipeline section flushes zope cache every so often, which has an
5effect of freeing up memory. This section is useful while performing migration
6on a weak system with a low memory. The flushcache section blueprint name is
7``quintagroup.transmogrifier.flushcache``.
8
9A flushcache section takes an optional ``every`` option, which defaults to
101000; cache is being flushed every ``every`` items passing through the pipe.
11A flushcache section doesn't alter the items in any way:
12
13>>> flushcache = """
14... [transmogrifier]
15... pipeline =
16...     source
17...     flushcache
18...     
19... [source]
20... blueprint = collective.transmogrifier.sections.tests.rangesource
21... size = 10
22...
23... [flushcache]
24... blueprint = quintagroup.transmogrifier.flushcache
25... every = 3
26... """
27>>> registerConfig(u'quintagroup.transmogrifier.tests.flushcache', flushcache)
28
29We'll show caching is flushed using dedicated variable on dummy plone instance
30called 'cacheMinimized'. Which is a number of caches performed.
31
32>>> transmogrifier(u'quintagroup.transmogrifier.tests.flushcache')
33>>> transmogrifier.context.cacheMinimized
343
Note: See TracBrowser for help on using the repository browser.