   (first (select event-extension-type
                  (where {:name (str (name type-name))}))))
 
+(def ^{:private true} cache-event-extra-data (cache/create-cache-region :event-extra-data 10000 (* 24 60 60 1000)))
+
 ;; TODO add caching
 (defn get-extension-type-by-name! [type-name]
   (util/try-times 1

                                                       event-annotation)]
        [clj-time.core :only (date-time now)]
        [clj-time.coerce :only (to-timestamp)]
        [clojure.tools.logging :only (debug info warn error)]
        )
  (:import [org.joda.time DateTime])

  (:require [ruuvi-server.configuration :as conf]
            [ruuvi-server.util :as util]
            [clojure.string :as string]
            [ruuvi-server.cache :as cache]
            [clojure.java.jdbc :as sql]
            )
  (:use [korma.db :only (transaction)]
        [korma.core :only (select where insert update values
                                  set-fields with limit order fields)]
