Class GTC

Global Time Cache.

class ooodev.globals.GTC[source]

Global Time based Cache.

This cache is a singleton and is shared across all instances of the application.

The cache as a lifetime of 5 minutes and expired items are cleaned up every 60 seconds.

__init__()[source]

Time based Cache.

Parameters:
  • seconds (float) – Cache expiration time in seconds.

  • cleanup_interval (float, optional) – Cache cleanup interval in seconds. If set to 0 then the cleanup is disabled. Defaults to 60.0.

Return type:

None

property cleanup_interval

Gets the cache cleanup interval in seconds.

property seconds

Gets the cache expiration time in seconds.