From 5bf29467cae32ca2a2aba866a77c228e0b237e0e Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Thu, 10 Feb 2022 09:46:40 -0600 Subject: 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. --- lazybones.lisp | 16 ---------------- package.lisp | 2 -- 2 files changed, 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 -- cgit v1.2.3