]> git.lizzy.rs Git - go-anidb.git/commitdiff
anidb: rename misc.go to globals.go
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Fri, 26 Jul 2013 17:37:57 +0000 (14:37 -0300)
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Fri, 26 Jul 2013 17:37:57 +0000 (14:37 -0300)
globals.go [new file with mode: 0644]
misc.go [deleted file]

diff --git a/globals.go b/globals.go
new file mode 100644 (file)
index 0000000..b74f1c9
--- /dev/null
@@ -0,0 +1,39 @@
+package anidb
+
+import (
+       "time"
+)
+
+type Language string
+
+var (
+       // Default durations for the various caches.
+       // Used by the IsStale methods.
+       DefaultCacheDuration = 7 * 24 * time.Hour
+       AnimeCacheDuration   = DefaultCacheDuration
+       EpisodeCacheDuration = DefaultCacheDuration
+       GroupCacheDuration   = 4 * DefaultCacheDuration // They don't change that often.
+       FileCacheDuration    = 8 * DefaultCacheDuration // These change even less often.
+
+       MyListCacheDuration        = 12 * time.Hour           // When the file isn't watched
+       MyListWatchedCacheDuration = 2 * DefaultCacheDuration // When the file is watched
+
+       LIDCacheDuration = 4 * DefaultCacheDuration
+
+       UIDCacheDuration = 16 * DefaultCacheDuration // Can these even be changed?
+
+       // Used for anime that have already finished airing.
+       // It's unlikely that they get any important updates.
+       FinishedAnimeCacheDuration = 4 * AnimeCacheDuration
+
+       // Used when a request uses a non-existing key (AID, ed2k+size, etc)
+       InvalidKeyCacheDuration = 1 * time.Hour
+
+       // Used when the UDP API Anime query fails, but the HTTP API query succeeds.
+       AnimeIncompleteCacheDuration = 24 * time.Hour
+
+       // Used when there's some data missing on a file.
+       // Usually happens because the AVDump data hasn't been merged with the database
+       // yet, which is done on a daily cron job.
+       FileIncompleteCacheDuration = 24 * time.Hour
+)
diff --git a/misc.go b/misc.go
deleted file mode 100644 (file)
index b74f1c9..0000000
--- a/misc.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package anidb
-
-import (
-       "time"
-)
-
-type Language string
-
-var (
-       // Default durations for the various caches.
-       // Used by the IsStale methods.
-       DefaultCacheDuration = 7 * 24 * time.Hour
-       AnimeCacheDuration   = DefaultCacheDuration
-       EpisodeCacheDuration = DefaultCacheDuration
-       GroupCacheDuration   = 4 * DefaultCacheDuration // They don't change that often.
-       FileCacheDuration    = 8 * DefaultCacheDuration // These change even less often.
-
-       MyListCacheDuration        = 12 * time.Hour           // When the file isn't watched
-       MyListWatchedCacheDuration = 2 * DefaultCacheDuration // When the file is watched
-
-       LIDCacheDuration = 4 * DefaultCacheDuration
-
-       UIDCacheDuration = 16 * DefaultCacheDuration // Can these even be changed?
-
-       // Used for anime that have already finished airing.
-       // It's unlikely that they get any important updates.
-       FinishedAnimeCacheDuration = 4 * AnimeCacheDuration
-
-       // Used when a request uses a non-existing key (AID, ed2k+size, etc)
-       InvalidKeyCacheDuration = 1 * time.Hour
-
-       // Used when the UDP API Anime query fails, but the HTTP API query succeeds.
-       AnimeIncompleteCacheDuration = 24 * time.Hour
-
-       // Used when there's some data missing on a file.
-       // Usually happens because the AVDump data hasn't been merged with the database
-       // yet, which is done on a daily cron job.
-       FileIncompleteCacheDuration = 24 * time.Hour
-)