<commit_before>#include "osgDB/ReadFile"
#include "ModelLibrary.h"

binding::Model::Model(osg::Node *node) : _node(node)
{
}

binding::Model::Model(const Model &model) : _node(model._node)
{
}

binding::Model* binding::ModelLoader::operator()(const char* filename)
{
    osg::Node *node = osgDB::readNodeFile(filename);
    return node == 0 ? 0 : new binding::Model(node);
}<commit_msg>enabling cache support for loading file<commit_after>#include "osgDB/ReadFile"
#include "ModelLibrary.h"

binding::Model::Model(osg::Node *node) : _node(node)
{
}

binding::Model::Model(const Model &model) : _node(model._node)
{
}

binding::Model* binding::ModelLoader::operator()(const char* filename)
{
    osg::ref_ptr<osgDB::Options> options = new osgDB::Options;
    options->setObjectCacheHint(osgDB::Options::CACHE_ALL);
    osg::Node *node = osgDB::readNodeFile(filename, options);
    return node == 0 ? 0 : new binding::Model(node);
}
{'fraction_non_alphanumeric': 0.17204301075268819, 'fraction_numerical': 0.004301075268817204, 'mean_word_length': 6.758333333333334, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, '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': '7279773', 'n_tokens_mistral': 326, 'n_tokens_neox': 320, 'n_words': 59}