Does the symfony file cache file system handle ext2 32000 files in the same directory limit?

Does the symfony caching system use ext2 32000 files in the same directory restriction?

I have 80,000 users and I want to cache their profiles, but does the Symfony system cache the ext2 restriction?

I also send messages to others who run into the same problem.

+5
source share
1 answer

I am not 100% sure if my answer is correct, but PROJECT/lib/symfony/cache/sfCacheFile.class.phpthere is a method in: sfCacheFile::getFilePath()that returns the path to the file. There seems to be no protection against file system restrictions ext2.

- :

  • PROJECT/apps/APP/config/factories.yml :

    default:
    # Others factories (if any)
    
      view_cache:
        class: myOwnFileCache
        param:
          automatic_cleaning_factor: 0
          cache_dir:                 %SF_TEMPLATE_CACHE_DIR%
          lifetime:                  86400
          prefix:                    %SF_APP_DIR%/template
    
  • , sfFileCache getFilePath()

    # PROJECT/lib/PROJECT/cache/myOwnFileCache.class.php        
    class myOwnFileCache extends sfFileCache {
        protected getFilePath($key) {
            /*
                Convert from: abcdef
                          to: a/b/abcdef
            */
            $key = substr($key, 0, 1) . DIRECTORY_SEPARATOR . substr($key, 1, 1) . DIRECTORY_SEPARATOR . $key;
            return parent::getFilePath($key);
        }
    

    }

  • : ./symfony cc

32000 , /, .

+1

All Articles