Skip to content

binary-com/perl-YAML-CacheLoader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status codecov Gitter chat

FUNCTIONS

  • LoadFile

    my $structure = LoadFile('/path/to/yml'[, $force_reload]);

    Loads the structure from '/path/to/yml' into $structure, preferring the cached version if available, otherwise reading the file and caching the result for 593 seconds (about 10 minutes).

    If $force_reload is set to a true value, the file will be loaded from disk without regard to the current cache status.

  • DumpFile

    DumpFile('/path/to/yml', $structure);

    Dump the structure from $structure into '/path/to/yml', filling the cache along the way.

  • FlushCache

    FlushCache();

    Remove all currently cached YAML documents from the cache server.

  • FreshenCache

    FreshenCache();

    Freshen currently cached files which may be out of date, either by deleting the cache (for now deleted files) or reloading from the disk (for changed ones)

    May optionally provide a list of files to check, otherwise all known cached files are checked.

    Returns a stats hash-ref.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published