PhoenixIconify.Cache (PhoenixIconify v0.3.0)

Copy Markdown View Source

Caches Iconify icon sets locally to avoid repeated API calls.

Icon sets are stored in priv/iconify/sets/ as JSON files.

Summary

Functions

Returns the cache directory path.

Clears all cached icon sets.

Fetches an icon set, using cache if available.

Gets a specific icon from cache, fetching the set if needed.

Checks if an icon set is cached locally.

Lists all cached icon set prefixes.

Loads a cached icon set.

Saves an icon set to cache.

Returns the path for a cached icon set.

Returns cache statistics.

Functions

cache_dir()

Returns the cache directory path.

clear()

Clears all cached icon sets.

fetch_set(prefix)

Fetches an icon set, using cache if available.

get_icon(prefix, icon_name)

Gets a specific icon from cache, fetching the set if needed.

has_set?(prefix)

Checks if an icon set is cached locally.

list_cached_sets()

Lists all cached icon set prefixes.

load_set(prefix)

Loads a cached icon set.

save_set(prefix, json_content)

Saves an icon set to cache.

set_path(prefix)

Returns the path for a cached icon set.

stats()

Returns cache statistics.