Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: File expiration date

by andreychek (Parson)
on Jun 07, 2001 at 20:22 UTC ( #86629=note: print w/ replies, xml ) Need Help??

in reply to File expiration date

Well, I'm wondering if it might be easier for you to use
a database, as opposed to files. What you could for every
classified ad is have a field for (amongst other things)
the ad itself, and the day it was posted. Whenever it is
posted, just use Perl to generate a datestamp and put it
into that database field. Then every evening, you could
have a cron job to dig through the database and expire (delete?)
entries that are 7 days old.

To use a database this way, you wouldn't even be required to
have a full fledged database server running in the background,
you could use something as simple as CSV files if thats what
you want. OTOH, MySQL and Postgres come pretty cheap :-)

Comment on Re: File expiration date

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://86629]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2015-11-29 23:25 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (754 votes), past polls