| 
		
			
			
				
			
			
				 
			
			
				
			
		 | 
		
			
			
				 
			
				
			
		 | 
	||||
| 
				Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.  You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us.  | 
		
		 
		![]()  | 
	
		
			
  | 	
	
	
		
		|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. | 
| 
		 | 
	Thread Tools | 
| 
			
			 | 
		#1 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jun 2003 
				Location: Kona, HI 
				
				
					Posts: 204
				 
				
				
				
				 | 
	
	
	
	
		
			
			 
				
				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 
				__________________ 
		
		
		
		
	
	ICQ: 12005327  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Feb 2004 
				
				
				
					Posts: 3,505
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 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). 
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jun 2003 
				Location: Kona, HI 
				
				
					Posts: 204
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 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 
				__________________ 
		
		
		
		
	
	ICQ: 12005327  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 |