You are here: Re: [PHP] Re: Cache « PHP « IT news, forums, messages
Re: [PHP] Re: Cache

Posted by Evert | Rooftop on 05/17/05 02:25

Jason Barnett wrote:

>
>> * Is file_get_contents the fastest way to open the file?
>
>
> AFAIK yes it is since it takes advantage of memory mapping (where
> possible).
>
>> * Is serialize the fastest way to serialize ;) ?
>
>
> Not sure.
>
>> * Are there any other things I should consider? (I'm aware of
>> file-locking issues, and have taken care of that)
>>
>> regards,
>> Evert
>
>
> Hmmmm... well, file_get_contents() doesn't lock the file so I'm
> interested in how you're accomplishing this feat. Perhaps you're
> creating a temporary directory (atomic IIRC) for the filename and then
> flocking that? I dunno, I hate race conditions.
>
I was to fast with that, I didn't look into it enough..
What _would_ be the fastest way (+locking) to do this?

> You might also want to consider the security of the data that goes
> into your cache'd $_APP data. Because any file that is created by PHP
> is going to be in pretty much the same boat as the default session
> files and on a shared server, well...
>
That's from a different thread, and is a different issue. I agree with
your argument though, I'm aware of this risk, but most of the time I
code on dedicated servers anyway =)

grt,
Evert

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация