Re: Are server classes possible?

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

 



Hello,

On 10/12/2004 04:18 PM, Jed R. Brubaker wrote:
I am thinking like JavaBeans. Here is what I have going on:

I have a series of rather database intensive queries that I would like some class to cache and provide access for page loads. I don't care how the information is stored, but I am trying to minimize the database call down to only once an hour at the most.

The trick is that I just want the data - like a quazi-db table in memory...

Is there something like that I should look at? Somewhere in PEAR?

You may want to try this generic data caching class. I use precisely for what you want, cache the contents of pages that are built with data from databases that does not change frequently and would consume too much database resources to retrieve all the time.


It caches the data in files and uses readers and writers locking to assure robustness and integrity of data caches preventing that simultaneous accesses corrupt the stored data.

If you need to cache data for many pages or eventually different data for the same pages but for different users like I have, caching all data in memory is not wise. The problem is that allocating too much memory may compromise the stability and performance of your system during moments when memory a lot of real memory is needed.

Caching a lot of pages or generic in disk is a good compromise because the modern operating systems use the free real memory for buffers that are relased on demand as your system requires it.

http://www.phpclasses.org/filecache


--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--
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