Hi,
I have a simple daily hit counter on my site that I want to use Redis as the datastore for.
Simply because redis has an expire, I dont have to set up a cron to clear the data down. Plus I want to try it out.
I store daily hits on a URL basis.
How can I store the daily hits for a url then have them expire at the end of the day.
for example:
incr today:www.google.com >> 1
incr today:www.google.com >> 2
incr today:www.google.com >> 3
incr today:www.yahoo.com >> 1
incr today:www.yahoo.com >> 2
How do I have these counters expire at the end of the day.
If I do an expire, it resets the counters.
I feel like my thought process is off. Am i doing things backwards?