<commit_before>odoo.define('web.DataManager', function (require) {
"use strict";

var core = require('web.core');
var Model = require('web.DataModel');
var session = require('web.session');
var utils = require('web.utils');

return core.Class.extend({
    init: function () {
        this.Filters = new Model('ir.filters');
        this._cache = {
            actions: {},
            fields_views: {},
            fields: {},
            filters: {},
            views: {},
        };
    },

    /**
     * Loads an action from its id or xmlid.<commit_msg>[IMP] web: allow to clear the cache in data manager<commit_after>odoo.define('web.DataManager', function (require) {
"use strict";

var core = require('web.core');
var Model = require('web.DataModel');
var session = require('web.session');
var utils = require('web.utils');

return core.Class.extend({
    init: function () {
        this.Filters = new Model('ir.filters');
        this._init_cache();
    },

    _init_cache: function () {
        this._cache = {
            actions: {},
            fields_views: {},
            fields: {},
            filters: {},
            views: {},
        };
    },

    /**
     * Invalidates the whole cache
     * Suggestion: could be refined to invalidate some part of the cache
     */
    invalidate: function () {
        this._init_cache();
    },

    /**
     * Loads an action from its id or xmlid.
{'fraction_non_alphanumeric': 0.15095676824946846, 'fraction_numerical': 0.0, 'mean_word_length': 2.18018018018018, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '7243177', 'n_tokens_mistral': 401, 'n_tokens_neox': 398, 'n_words': 105}