Re: Locking in PHP (Question for PHP Gurus)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lars B. Jensen wrote:
I would use a cronjob to make the entry rather than a user, why let the poor guy wait for you to create the content

You may have 2 requests both trying to

create the new cache entry, but that is much cleaner than having to deal with locking. Do a tempnam() to get a temp file to write to and then do a rename() if this is a filesystem thing.

Right, if he has access to create cron jobs, that is of course by far the superior approach.


-Rasmus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux