Skip to content

bolig_ping.cache

source module bolig_ping.cache

Cache to store already sent homes.

Functions

source store_to_cache(homes: list[Home], emails: list[str], cache_path: Path = Path('.bolig_ping_cache'))None

Store the homes to the cache.

Parameters

  • homes : list[Home] The homes to store in the cache.

  • emails : list[str] The receiver(s) of the homes.

  • cache_path : optional The path to the cache file. Defaults to ".bolig_ping_cache".

source remove_cached_homes(homes: list[Home], emails: list[str], cache_path: Path = Path('.bolig_ping_cache'))list[Home]

Remove the cached homes from the list of homes.

Parameters

  • homes : list[Home] The homes to remove the cached homes from.

  • emails : list[str] The receiver(s) of the homes.

  • cache_path : optional The path to the cache file. Defaults to ".bolig_ping_cache".

Returns

  • list[Home] The homes without the cached homes.