<commit_before>/*
 @author <NAME>
 @component DbCache
 */

screens.db.cache = function DbCache(me) {
    return "server";
};

screens.db.cache.file = function DbCacheFile(me) {
    me.init = () => me.storage.db.extension(me);
    me.listing = async function (folder, update, callback) {
        var files = await me.db.cache.file.list({ folder });
        if (!files || !files.length || update) {
            var children = await me.storage.file.getChildren(folder);
            for (let file of children) {
                file.folder = folder;
                var exists = files.find(item => item.name === file.name);
                if (!exists && callback) {
                    await callback(file);
                }
                await me.db.cache.file.use({ folder, name: file.name }, file);
            }
        }
        return files;
    };
    return "server";
};<commit_msg>bug fix<commit_after>/*
 @author <NAME>
 @component DbCache
 */

screens.db.cache = function DbCache(me) {
    return "server";
};

screens.db.cache.file = function DbCacheFile(me) {
    me.init = () => me.storage.db.extension(me);
    me.listing = async function (folder, update, callback) {
        var files = await me.db.cache.file.list({ folder });
        if (!files || !files.length || update) {
            var children = await me.storage.file.getChildren(folder);
            for (let file of children) {
                file.folder = folder;
                var exists = files.find(item => item.name === file.name);
                if (!exists) {
                    if (callback) {
                        await callback(file);
                    }
                    await me.db.cache.file.use({ folder, name: file.name }, file);
                }
            }
        }
        return files;
    };
    return "server";
};
{'fraction_non_alphanumeric': 0.1389496717724289, 'fraction_numerical': 0.0, 'mean_word_length': 1.705621301775148, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6585323', 'n_tokens_mistral': 530, 'n_tokens_neox': 511, 'n_words': 124}