Jose Borges Ferreira: > > Why not implement a cache: maptype that you can prepend to the > > source (a pipeline any simple lookup table): > > > > cache:!maptype:mapname!ttl!pipeline... > > > > where maptype:mapname implements persistent storage. This searches > > the persistent storage first, and if the item is not found or too > > old, invokes the source (pipeline or whatever) and stores a fresh > > result. > > > > The only problem is who invokes the cache cleanup operation. > > Humm ... I usually go for memcache or redis for this kind o cache so I > won't have to deal with expiration and cleanup.
In that case the syntax would be: cache:!memcache:/etc/postfix/whatever!0:pipeline:.... There should be a "source" feature in the memcache client that is like a read-only version of "backup". Then, one could say: /etc/postfix/main.cf: whatever = ... memcache:/etc/postfix/whatever ... /etc/postfix/whatever: source = pipeline:.... The "source" feature would be perfect for DNS, reputation, etc. Wietse > For lmdb,btree,mdb and other persistent storage that is a pain. > But caching is something that make sense at large scale and/or with > slower backends and should be dealt with care. It not for everyday > implementations. > Have check internal table to see if it's a straightforward for this cases. > > Jos? Borges Ferreira >