{"action":"created","issue":{"url":"https://api.github.com/repos/PHPSocialNetwork/phpfastcache/issues/365","repository_url":"https://api.github.com/repos/PHPSocialNetwork/phpfastcache","labels_url":"https://api.github.com/repos/PHPSocialNetwork/phpfastcache/issues/365/labels{/name}","comments_url":"https://api.github.com/repos/PHPSocialNetwork/phpfastcache/issues/365/comments","events_url":"https://api.github.com/repos/PHPSocialNetwork/phpfastcache/issues/365/events","html_url":"https://github.com/PHPSocialNetwork/phpfastcache/issues/365","id":179741195,"number":365,"title":"Files driver, simultaneous write","user":{"login":"brainfoolong","id":1684236,"avatar_url":"https://avatars.githubusercontent.com/u/1684236?v=3","gravatar_id":"","url":"https://api.github.com/users/brainfoolong","html_url":"https://github.com/brainfoolong","followers_url":"https://api.github.com/users/brainfoolong/followers","following_url":"https://api.github.com/users/brainfoolong/following{/other_user}","gists_url":"https://api.github.com/users/brainfoolong/gists{/gist_id}","starred_url":"https://api.github.com/users/brainfoolong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brainfoolong/subscriptions","organizations_url":"https://api.github.com/users/brainfoolong/orgs","repos_url":"https://api.github.com/users/brainfoolong/repos","events_url":"https://api.github.com/users/brainfoolong/events{/privacy}","received_events_url":"https://api.github.com/users/brainfoolong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-28T10:55:59Z","updated_at":"2016-09-29T11:51:33Z","closed_at":null,"body":"Hi, i today found this library and it looks really great to me. But the thing is, does the \"files\" driver also can handle multiple \"write\" calls from different sources at the same time? I mean, i've seen so many caching libraries that always have the problem When i use a file based cache than it sometimes comes to \"Access denied\" because some other thread accessing the same file at the same time for write access.\r\n\r\nI quick look at the driver for the files, i cannot find any blocking mechanism like `flock` or so that will try to prevent exactly that problem.\r\n\r\nThe weird thing is, i don't found any related problem to this, so, does this problem not happen with phpfastcache? Can i safely use files cache with heavy load servers that also do much write actions on it?\r\n\r\nEven native SQLite cannot handle such situations.\r\n\r\nI just want to ask before i change my code to use phpfastcache."},"comment":{"url":"https://api.github.com/repos/PHPSocialNetwork/phpfastcache/issues/comments/250444943","html_url":"https://github.com/PHPSocialNetwork/phpfastcache/issues/365#issuecomment-250444943","issue_url":"https://api.github.com/repos/PHPSocialNetwork/phpfastcache/issues/365","id":250444943,"user":{"login":"Geolim4","id":1332071,"avatar_url":"https://avatars.githubusercontent.com/u/1332071?v=3","gravatar_id":"","url":"https://api.github.com/users/Geolim4","html_url":"https://github.com/Geolim4","followers_url":"https://api.github.com/users/Geolim4/followers","following_url":"https://api.github.com/users/Geolim4/following{/other_user}","gists_url":"https://api.github.com/users/Geolim4/gists{/gist_id}","starred_url":"https://api.github.com/users/Geolim4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Geolim4/subscriptions","organizations_url":"https://api.github.com/users/Geolim4/orgs","repos_url":"https://api.github.com/users/Geolim4/repos","events_url":"https://api.github.com/users/Geolim4/events{/privacy}","received_events_url":"https://api.github.com/users/Geolim4/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T11:51:33Z","updated_at":"2016-09-29T11:51:33Z","body":"To be efficient the lock must be exclusive, but on some environment (E.g Unix) super-users can still open the file (like root). The Mutex is a bad idea, in case of an Exception is trowed or a fatal error occurs, the mutex stays on the disc which will lock the file forever.\r\n\r\nI will work on a fix in the next days but this will be a modification that will must be enabled in options (E.g. secureFileManipulation) cuz this can decrease performances.\r\n\r\nI will first release this on V6 which is still in development then merging to the V5 if everything looks good."}}
{"actor":{"display_login":"Geolim4"}}