#5541: File locking broken with File based cache
-------------------------------+--------------------------------------------
    Reporter:  timr            |          Type:  Bug        
      Status:  new             |      Priority:  Medium     
   Milestone:  1.2.x.x         |     Component:  File System
     Version:  RC3             |      Severity:  Normal     
    Keywords:                  |   Php_version:  n/a        
Cake_version:  1.2.0.7692 RC3  |  
-------------------------------+--------------------------------------------
 I ran into a race condition doing two ajax updates on the same page at
 once. It would sometimes give me errors about failing to unlink(). The
 errors were kind of like https://trac.cakephp.org/ticket/4370.

 To fix it I turned on locking like this:
 Cache::config('default', array('engine' => 'File', 'lock' => true));

 In both rc2 and rc3 it gave me a large number of warnings about flock
 after doing that. It seems someone broke it. So I fixed it. I just deleted
 the file_get_contents section, I guess that's some kind of optimization,
 but it doesn't work with locking.
 The problem was it was trying to lock the file before opening it.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/5541>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to