aboutsummaryrefslogtreecommitdiff
path: root/sx-cache.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2014-11-08 18:24:45 -0500
committerSean Allred <code@seanallred.com>2014-11-08 18:24:45 -0500
commitcecb4a444067d1f73a8ed3dd5e4ec5002e87cc7e (patch)
treee9a8e4453b470fd21b951b8d431ea5fad2d59196 /sx-cache.el
parent4207f8a4764ad3a0bca402160a24cca714cf0cde (diff)
parentbd5e1b387b6f70ff756a2ceda229209c16a2eaf3 (diff)
Merge pull request #34 from vermiculus/initialization
Initialization; Persistent, Lazy Filters
Diffstat (limited to 'sx-cache.el')
-rw-r--r--sx-cache.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/sx-cache.el b/sx-cache.el
index ed4895a..098c292 100644
--- a/sx-cache.el
+++ b/sx-cache.el
@@ -19,7 +19,12 @@
;;; Commentary:
+;; All caches are retrieved and set using symbols. The symbol should
+;; be the sub-subpackage that is using the cache. For example,
+;; `sx-pkg' would use `(sx-cache-get 'pkg)'.
;;
+;; This symbol is then converted into a filename within
+;; `sx-cache-directory'.
;;; Code:
@@ -29,7 +34,9 @@
(defun sx-cache-get-file-name (filename)
"Expands FILENAME in the context of `sx-cache-directory'."
- (expand-file-name filename sx-cache-directory))
+ (expand-file-name
+ (concat (symbol-name filename) ".el")
+ sx-cache-directory))
(defun sx-cache-get (cache)
"Return the data within CACHE.