aboutsummaryrefslogtreecommitdiff
path: root/sx-cache.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2014-11-09 16:12:43 -0500
committerSean Allred <code@seanallred.com>2014-11-09 16:12:43 -0500
commit73943fe3ff5e55758df295343d8004fde79d1e62 (patch)
tree89bee3942c01eb3e399c9c2a5231ffd26e9e4abf /sx-cache.el
parent0b8fd6291719c4913f64a9e322abcb025fbf5e40 (diff)
parent5305686182f9e233d0c4d056eab9f28a40e3932c (diff)
Merge branch 'master' into network-list
Conflicts: sx-site.el
Diffstat (limited to 'sx-cache.el')
-rw-r--r--sx-cache.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/sx-cache.el b/sx-cache.el
index a090982..098c292 100644
--- a/sx-cache.el
+++ b/sx-cache.el
@@ -2,8 +2,7 @@
;; Copyright (C) 2014 Sean Allred
-;; Author: Sean Allred <sallred@calamity.tcs.com>
-;; Keywords: help
+;; Author: Sean Allred <code@seanallred.com>
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -20,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:
@@ -30,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.