Re: Re: Pear::Cache lock files

From: Date: Thu, 14 Feb 2002 15:36:34 +0000
Subject: Re: Re: Pear::Cache lock files
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-4707@lists.php.net to get a copy of this message
i would prefer a solution wich could handle different kind of solutions. it means the user can choose between flock()-, semaphore- or your workaround- style to prevent data corruption .
good idea. but especially for something like a cache class, performance is very important, so i would say: KISS (keep it simple stupid ... ) that does not say, that i think, it doesn't need file locking
I agree that for cache classes it is important to stick with KISS. Maybe adding set_file_buffer($f, 0); to write unbuffered still would be a good idea. Since then I didn't notice any more corrupt cache data on our site, even though it still might happen. The other changes were to avoid the concurrent cpu intensive data generation processes, which most people might not have a problem with. So keeping that part out probably is a good idea. Vinai

« previous php.pear.dev (#4707) next »