Common Lisp Package: CAVEMAN.CONTEXT

# Caveman.Context - Managing current state for each request. ## SYNOPSIS ;; In the controller. ;; Get context object. (context) ;=> #<HASH-TABLE :TEST EQL size 0/60 #x3020025FF5FD> ;; Access to each value. (context :hoge) ;=> "Something set to :hoge." ;; Set to context (setf (context :hoge) "hogehoge") ## DESCRIPTION Caveman.Context is for managing current state for each request. It is called "Context" in Caveman. Specifically, context is a hash table in global scope. you can access it with a function `context'. See SYNOPSIS for details. ## AUTHOR * Eitarow Fukamachi (e.arrows@gmail.com)

README:

FUNCTION

Public

CONTEXT (&OPTIONAL KEY)

Access to current context. If key is specified, return the value in current context. If not, just return a current context. Example: (context) ;=> #<HASH-TABLE :TEST EQL size 0/60 #x3020025FF5FD> (context :request) ;=> #<CAVEMAN.REQUEST:<REQUEST> #x3020024FCCFD>

MAKE-CONTEXT (REQ)

Create a new Context.

Undocumented

SETFCONTEXT (VAL KEY)

Private

MAKE-REQUEST (REQ)

Construct a request instance.

MAKE-RESPONSE (&OPTIONAL STATUS HEADERS BODY)

Construct a response instance.

MACRO

Public

Undocumented

WITH-CONTEXT-VARIABLES ((&REST VARS) &BODY BODY)

VARIABLE

Public

*CONTEXT*

Special variable to store Caveman Context, a hash table. Don't set to this variable directly. This is designed to be bound in lexical let.

*PROJECT*

Special variable to store current Caveman application. Don't set to this variable directly. This is designed to be bound in lexical let.

*REQUEST*

Special variable to store Caveman Request, a instance of `<request>' in Caveman.Request package. Don't set to this variable directly. This is designed to be bound in lexical let.

*RESPONSE*

Special variable to store Caveman Response, a instance of `<response>' in Caveman.Response package. Don't set to this variable directly. This is designed to be bound in lexical let.

*SESSION*

Special variable to store session. Don't set to this variable directly. This is designed to be bound in lexical let.