Created
September 11, 2013 19:09
-
-
Save klizhentas/6528324 to your computer and use it in GitHub Desktop.
Counters with TTL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE hits ( | |
hit text PRIMARY KEY, | |
counter counter | |
) WITH COMPACT STORAGE; | |
UPDATE hits USING TTL 3600 SET counter = counter + 1 WHERE hit='api-call-some-hour'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment