Storing files in cache

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

Storing files in cache

Post by GeXus »

Hello,

I have a maxmind GeoIP database. They give it to you in a .dat file. They also give you a wrapper class where you specify the .dat location.

What I would like to do is store this .dat file in cache using memcache. Memcache let's you store objects, strings, numbers, etc. in cache...

I'm wondering if anyone would know how I would store a .dat file in cache? I could imagine doing a file_get_contents on it and storing that into cache, but then how would I specify the location for the dat file?
Post Reply