trochee: (Default)
[personal profile] trochee
For the techies in my readers list:

I am looking at mechanisms for persistence of a fairly large, but potentially-expirable, data pool -- for simplicity, suppose it's recent livejournal entries. (no, I'm not writing a livejournal client! just an example).

I am building tools that want to know about recent activity, but might also sometimes want to look at the recent history; yet I'd only like to invoke the tool from a cron-job or something similar.

I've just discovered Apache::Session -- and though that's designed for web use, it seems like it might be a good choice anyway. But there's also Cache, Cache::Cache, and CHI -- any experience on whether one or another of these is the thing to go with? Looks like the last of these is the most recently updated, which is either a sign that it's the best material or that it's the latest reinvention of the wheel.

So: any recommendations on a data-cacheing class for a repeated invocation of the same process, such that it can "remember" what's been done before?

Date: 2009-03-10 11:04 pm (UTC)
From: [identity profile] xaosenkosmos.livejournal.com
What's wrong with using good old tie on DBM or DB_File? Manual expiry is a pain?

(I really like SQLite, but perl's got much better support for much crappier databases built right in =\)

Date: 2009-03-10 11:10 pm (UTC)
From: [identity profile] trochee.livejournal.com
nothing's wrong with a direct use of tie; I just realized that expiry is complicated, and file locking, and i'd want to be able to switch out the back-end, and and and.

then i thought "I'm not the first person to think about this, am i?" and I started poking around at CPAN, which is where I found this embarrassment of riches.

But perhaps I should just implement it with a DB_File for now and switch out later.

Date: 2009-03-10 11:27 pm (UTC)
From: [identity profile] trochee.livejournal.com
also, i'd like to store non-flat structures. so perhaps I'll use MLDBM instead, or just use Storable.

Profile

trochee: (Default)
trochee

June 2016

S M T W T F S
   1234
567 89 1011
12131415 161718
19202122232425
2627282930  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 5th, 2026 06:04 pm
Powered by Dreamwidth Studios