Link Details

Link 82606 thumbnail
User 250830 avatar

By imgiseverything
via imgiseverything.co.uk
Published: May 24 2008 / 17:27

This week, my work for our top secret web app, has mainly revolved around caching. This is work I really enjoy. I can sense the user experience of future customers improving each time I create a useful cache of information that speeds up a page’s load time. In 4 steps I'll demonstrate how to easily cache a PHP object for improved performance.
  • 6
  • 4
  • 1454
  • 557

Comments

Add your comment
User 239201 avatar

amphi replied ago:

0 votes Vote down Vote up Reply

Wow. Even the thumbnail makes my eyes hurt. Worst color scheme ever.

User 290497 avatar

Daron replied ago:

0 votes Vote down Vote up Reply

Looks to me like this guy has effectively reinvented Memcache with flat files. No idea why he bothered, unless his server has no RAM...

http://www.php.net/manual/en/intro.memcache.php
,

User 207069 avatar

hal10001 replied ago:

1 votes Vote down Vote up Reply

I love it when developers throw out a module like memcache, and completely fail to see the benefit of at least trying to understand how to write your own caching mechanism. That just goes to show that most developers are cut-and-paste, fly-by-night programmers. Could he use memcache? Would it suit his needs as well as the needs of several others? Well, it sure might, but then you would really know absolutely nothing about object caching in PHP would you? Try suggesting an alternative approach altogether, other than a pre-built solution.

User 256367 avatar

blizz.myopenid.com replied ago:

1 votes Vote down Vote up Reply

I custom built the system I use for my site. It uses a combination of file caching + memcache depending on how old the object being cached is and how frequently it is accessed. So this is a nice beginning towards that, but I would certainly take a look at memcache. If you need caching from multiple servers, try APC

User 250830 avatar

imgiseverything replied ago:

0 votes Vote down Vote up Reply

Thanks for everyone's comments in this thread.

@Daron: You'll have to excuse my ignorance, I didn't know about Memcache. I'll be looking into it to see if it suits my needs though.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (6)



Voters Against This Link (4)