{"action":"opened","issue":{"url":"https://api.github.com/repos/lencioni/SLIR/issues/31","labels_url":"https://api.github.com/repos/lencioni/SLIR/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/lencioni/SLIR/issues/31/comments","events_url":"https://api.github.com/repos/lencioni/SLIR/issues/31/events","html_url":"https://github.com/lencioni/SLIR/issues/31","id":57738483,"number":31,"title":"too much files in rendered and request directory","user":{"login":"ddjikic","id":4875524,"avatar_url":"https://avatars.githubusercontent.com/u/4875524?v=3","gravatar_id":"","url":"https://api.github.com/users/ddjikic","html_url":"https://github.com/ddjikic","followers_url":"https://api.github.com/users/ddjikic/followers","following_url":"https://api.github.com/users/ddjikic/following{/other_user}","gists_url":"https://api.github.com/users/ddjikic/gists{/gist_id}","starred_url":"https://api.github.com/users/ddjikic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddjikic/subscriptions","organizations_url":"https://api.github.com/users/ddjikic/orgs","repos_url":"https://api.github.com/users/ddjikic/repos","events_url":"https://api.github.com/users/ddjikic/events{/privacy}","received_events_url":"https://api.github.com/users/ddjikic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-15T17:44:17Z","updated_at":"2015-02-15T17:44:17Z","closed_at":null,"body":"i have too much files in request and rendered directories so i edited SLIR.php and added\r\n\r\n     function gethashdir( $folder = '' )\r\n     {\r\n        $id    = $this->requestURI();\r\n        $parts = array_slice( str_split( $hash = md5( $id ), 2 ), 0, 2 );\r\n         if ( ! is_dir( $folder . '/' . join( '/', $parts ) . '/' . $hash ) ) {\r\n               mkdir( $folder . '/' . join( '/', $parts ) . '/' . $hash, 0755, true );\r\n         }\r\n          return $folder . '/' . join( '/', $parts ) . '/' . $hash;\r\n     }\r\n\r\nend edited\r\n \r\n        private function getRequestCacheDir()\r\n       {\r\n           $configClass = SLIR::getConfigClass();\r\n           return $this->gethashdir( $configClass::$pathToCacheDir . '/request' );\r\n       }\r\n\r\n       private function getRenderedCacheDir()\r\n       {\r\n              $configClass = SLIR::getConfigClass();\r\n               return $this->gethashdir( $configClass::$pathToCacheDir . '/rendered' );\r\n       }\r\n\r\nnow the structure is like\r\n/request/\r\n        - 0e/d21/0ed21c454ba0b4ff50c8532c8a9603c5/38738eb1a4ea56768e17c541f7ff96fa\r\n        - 1b/b6/1bb681f79cf5dd0670090c91236b9f39/24bc29f33c837edab9a425aaf4c025e8\r\n\r\ninstead of \r\n/request/\r\n        -  38738eb1a4ea56768e17c541f7ff96fa\r\n        -  24bc29f33c837edab9a425aaf4c025e8\r\n\r\n\r\n  \r\n"}}