<commit_before>namespace orm
{
    template<typename T>
    Cache<T>::Cache()
    {
        #if ORM_DEBUG & ORM_DEBUG_REGISTER
        std::cerr<<MAGENTA<<"[Register] Cache of "<<T::table<<BLANC<<std::endl;
        #endif
    };

    template<typename T>
    Cache<T>::~Cache()
    {
        #if ORM_DEBUG & ORM_DEBUG_REGISTER
        std::cerr<<MAGENTA<<"[Delete] Cache of "<<T::table<<BLANC<<std::endl;
        #endif
    }

    template<typename T>
    typename Cache<T>::type_ptr Cache<T>::getOrCreate(const unsigned int& pk,DB& db,int max_depth)
    {
        //std::lock_guard<std::mutex> lock(_mutex);//lock
        //already existe
#ifdef ORM_USE_CACHE
        const auto& res= map.find(pk);
        if(res != map.end())
            return res->second;
#endif

        T* ptr = T::_get_ptr(pk,db,max_depth);
        if(ptr == nullptr)
            ptr = new T();
            <commit_msg>remove cache MSG whene not needed<commit_after>namespace orm
{
    template<typename T>
    Cache<T>::Cache()
    {
#ifdef ORM_USE_CACHE
        #if ORM_DEBUG & ORM_DEBUG_REGISTER
        std::cerr<<MAGENTA<<"[Register] Cache of "<<T::table<<BLANC<<std::endl;
        #endif
#endif
    };

    template<typename T>
    Cache<T>::~Cache()
    {
#ifdef ORM_USE_CACHE
        #if ORM_DEBUG & ORM_DEBUG_REGISTER
        std::cerr<<MAGENTA<<"[Delete] Cache of "<<T::table<<BLANC<<std::endl;
        #endif
#endif
    }

    template<typename T>
    typename Cache<T>::type_ptr Cache<T>::getOrCreate(const unsigned int& pk,DB& db,int max_depth)
    {
        //std::lock_guard<std::mutex> lock(_mutex);//lock
        //already existe
#ifdef ORM_USE_CACHE
        const auto& res= map.find(pk);
        if(res != map.end())
            return res->second;
#endif

        T* ptr = T::_get_ptr(pk,db,max_depth);
        if(ptr == nullptr)
            ptr = new T();
            
{'fraction_non_alphanumeric': 0.15343347639484978, 'fraction_numerical': 0.0, 'mean_word_length': 2.5456273764258555, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 21, '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': '4409342', 'n_tokens_mistral': 652, 'n_tokens_neox': 635, 'n_words': 125}