aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2022-02-10 09:46:40 -0600
committerColin Okay <okay@toyful.space>2022-02-10 09:46:40 -0600
commit5bf29467cae32ca2a2aba866a77c228e0b237e0e (patch)
tree11b90b45c0c401ceb9be627070cac97b56df7a60
parent96992c16cb786dd2efaf92e4c1da014230aea627 (diff)
decided to drop the app-state
For two reasons. 1) concurrent access to the app-state-table is non-portable and was probably added to address a specific need I found myself reaching for; 2) because lazybones is about routing, and nothing more -- all state should live elsewhere.
-rw-r--r--lazybones.lisp16
-rw-r--r--package.lisp2
2 files changed, 0 insertions, 18 deletions
diff --git a/lazybones.lisp b/lazybones.lisp
index aab1217..c0f1550 100644
--- a/lazybones.lisp
+++ b/lazybones.lisp
@@ -60,10 +60,6 @@
is evoked when an ENDPOINT's AUTH slot is T. Endpoints may
override this behavor by supplying a function in place of T. A
value of NIL means that there is no default authorizer.")
- (state-table
- :accessor app-state-table
- :initform (make-hash-table :test 'equal :synchronized t)
- :documentation "A hash table with EQUAL comparing keys. Used for storing arbitrary application state.")
(default-content-type
:accessor default-content-type
:initarg :content-type
@@ -73,18 +69,6 @@
:accessor app-endpoints
:initform nil)))
-(defun app-state (key &optional (app *app*))
- "Fetch private app state by key. Key comparison is by EQUAL."
- (gethash key (app-state-table app)))
-
-(defun (setf app-state) (value key &optional (app *app*))
- "Update the private app state by key. Key comparison is by EQUAL."
- (setf (gethash key (app-state-table app)) value))
-
-(defun remove-app-state (key &optional (app *app*))
- "Drops the value of KEY in the app state table, if it exists."
- (remhash key (app-state-table app)))
-
(defun expand-provision-app-option (app option value)
(list 'setf
(ecase option
diff --git a/package.lisp b/package.lisp
index 901f569..22766cd 100644
--- a/package.lisp
+++ b/package.lisp
@@ -44,8 +44,6 @@
#:generate-app-documentation
#:provision-app
#:app
- #:app-state
- #:remove-app-state
#:canned-response
#:set-canned-response
#:create-server