http://www.perlmonks.org?node_id=653512

tosh has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am going to be using the S3 service from Amazon and in order to keep some of my data xfer costs down I want to cache the most used files on my server.

I've been looking for some kind of vanilla cache management modules or methods but keep coming up with RAM cache or template cache or squirrel cache.

I'd love to not reinvent the wheel so if anybody knows of anything along these lines I would love to find out!!

Thanks!

UPDATE WITH ANSWER

In case anyone is looking for the same thing in the future here is the solution I have come up with using Cache::SizeAwareFileCache

::PUT FILE:: IF filesize > MAX_S3_SIZE SAVE file locally ELSE SAVE file in SizeAwareFileCache SAVE file to S3 ::GET FILE:: IF file in SizeAwareFileCache SEND file ELSE SEND user to get file from S3 GET file from S3 and put into SizeAwareFileCache