Cache¶
Module for handling caching mechanisms for the application.
Classes:
| Name | Description |
|---|---|
CacheKey |
Cache keys for the Logseq Analyzer. |
Cache |
Cache class to manage caching of modified files and directories. |
Cache(cache_path: Path)
dataclass
¶
Cache class to manage caching of modified files and directories.
Methods:
| Name | Description |
|---|---|
configure |
Configure the Cache class with necessary settings. |
open |
Open the cache file. |
close |
Close the cache file. |
initialize |
Clear the cache if needed. |
clear |
Clear the cache. |
clear_deleted_files |
Clear the deleted files from the cache. |
iter_modified_files |
Get the modified files from the cache. |
configure(args: Args, analyzer_dirs: LogseqAnalyzerDirs) -> None
classmethod
¶
Configure the Cache class with necessary settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
Args
|
Command line arguments. |
required |
analyzer_dirs
|
LogseqAnalyzerDirs
|
Directory paths for the Logseq analyzer. |
required |
open(protocol: int = 5) -> None
¶
Open the cache file.
close(index: FileIndex) -> None
¶
Close the cache file.
initialize() -> FileIndex
¶
Clear the cache if needed.
clear() -> None
¶
Clear the cache.
clear_deleted_files() -> FileIndex
¶
Clear the deleted files from the cache.
iter_modified_files() -> Generator[Path, Any]
¶
Get the modified files from the cache.