The database used by Zope has an object cache that helps to manage movement of objects to and from the database. When an object is retrieved from the database, it is copied to the cache. Subsequent retrievals can be performed very quickly from the cache. The cache also provides for removing unneeded objects from memory. This is performed through cache garbage collection.
Garbage collection is performed by scanning objects in the database cache.
Objects that have not been accessed in a long time are deactivated. Deactivating an object causes all of its data to be freed from memory. The object is placed in a deactivated state. Its data will be reloaded as necessary the next time the object is used. Objects that are only referenced by the cache are removed from the cache and memory.