<commit_before># Cacher

The process of read a resource can be very slow, that's why you should always
use cache.

    $cacher = new Cacher(
        new FileVersionChecker('path/to/cache/', '.check')
        new FileStorer('path/to/cache/')
    );

    if ($cacher->check($resource)) {
        return $cacher->retrieve($resource);
    }

First argument is a ```Checker``` class, used to check if a resource has valid
cache or not.

A common ```Checker``` is the ```FileVersionChecker```, it
determines if the resource has changed since it was cached. So, the cache is
used just if the file is the same.

Another common ```Checker``` is the ```TtlChecker```, it validates the cache by
a number of seconds, after that time the cache is considered invalid.<commit_msg>Added missing doc about Storer class<commit_after># Cacher

The process of read a resource can be very slow, that's why you should always
use cache.

    $cacher = new Cacher(
        new FileVersionChecker('path/to/cache/', '.check')
        new FileStorer('path/to/cache/')
    );

    if ($cacher->check($resource)) {
        return $cacher->retrieve($resource);
    }

First argument is a ```Checker``` class, used to check if a resource has valid
cache or not.

A common ```Checker``` is the ```FileVersionChecker```, it
determines if the resource has changed since it was cached. So, the cache is
used just if the file is the same.

Another common ```Checker``` is the ```TtlChecker```, it validates the cache by
a number of seconds, after that time the cache is considered invalid.

Second argument is a ```Storer``` class, used to store cache data.

A common ```Storer``` is the ```FileStorer``` class. It uses the filesystem to
store the cache.
{'fraction_non_alphanumeric': 0.11292200232828871, 'fraction_numerical': 0.0, 'mean_word_length': 3.7355371900826446, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '60309', 'n_tokens_mistral': 489, 'n_tokens_neox': 493, 'n_words': 230}