       (car/lpush "classifications" record)
       (car/ltrim "classifications" 0 99)
       (car/lpush (str "classifications-" date) record)
-      (if (= 1 (wcar* (car/exists (str "classifications-" week-ago))))
-        (car/del (str "classifications-" week-ago))))))
+      (if (= 1 (wcar* (car/exists (str "classifications-" prev-date))))
+        (car/del (str "classifications-" prev-date))))))
 
 (defn get-all
   ([]

        location (first (p/find-ips (:user_ip classification)))
        country (:country location)
        today (now)
        week-ago (minus today (weeks 1))
        date (str (month today) "-" (day today))
        prev-date (str (month week-ago) "-" (day week-ago))
        record (dissoc (merge classification 
                              {:location location 
                               :id id}) :user_ip)]

(ns zoo-live.model.redis
  (:use [clj-time.core :only [day month now minus days]])
  (:require [taoensso.carmine :as car]
            [zoo-live.model.postgres :as p]))

