GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP Q: App variables, caching (https://gfy.com/showthread.php?t=258517)

aiken 03-25-2004 03:31 PM

PHP Q: App variables, caching
 
After years of ASP and ASP.Net work, I'm messing around with a small PHP project. I can deal with the fact that PHP doesn't have application variables, and I've found a few libraries that provide that functionality.

But what I really need is something like ASP.Net's Cache object -- something where I can stuff data into an application-type variable with an expiration date. I figure I could write it myself, but obviously I'd rather get on with the project than reinvent the wheel.

Anyone know any application data cache management libraries for PHP?

Thanks
-b

Repetitive Monkey 03-25-2004 03:48 PM

If I understand your question correctly, you could store the data along with an expiration date (".time()+60." for example) in MySQL and then crontab a script to maintain it (delete data whose time has run out).

aiken 03-25-2004 04:01 PM

Thanks for the reply -- you did understand what I was after, and you're quite right, but I should have mentioned that the whole point is to lighten DB load. This would still achieve that somewhat, by virtue of the selects being much lighter weight, but I'm hoping for something that uses server memory, or at worst server disk, rather than DB.

Cheers
-b


All times are GMT -7. The time now is 12:10 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123