'Drop blobs from cache that have not been accessed in over 5
minutes.
To attempt to keep memory consumption under control we want to
ensure we don\'t keep everything cached from the db in memory
until process completion.'

def cull_mem(self):

    self._lock.acquire()
    try:
        N = 10
        if (len(self._blob_and_atime_from_blobname_from_lang_cache) < N):
            return
        log.info('catalog:    culling    memory')
        now = time.time()
        for (lang, blob_and_atime_from_blobname) in self._blob_and_atime_from_blobname_from_lang_cache.items():
            for (blobname, (blob, atime)) in blob_and_atime_from_blobname.items():
                if ((now - atime) > 300.0):
                    del blob_and_atime_from_blobname[blobname]
    finally:
        self._lock.release()
