Skip to content

Documentation


Documentation / @blazetrails/actionpack / Session / MemCacheStore

Class: MemCacheStore ​

Defined in: packages/actionpack/lib/action-dispatch/middleware/session/mem-cache-store.ts:20

ActionDispatch::Session::MemCacheStore (actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb:23-26) descends from Rack::Session::Dalli, a class of the dalli gem, which trails does not vendor, and includes Compatibility, StaleSessionCheck and SessionObject into that ancestry. With no Dalli seat, CacheStore stands in as the superclass. CacheStore already has the three modules through AbstractSecureStore (abstract_store.rb:97-100), so Ruby's include_modules_at would skip all three (vendor/ruby/v3.3.11/class.c:1281,1291,1296), and the calls are not made.

Extends ​

Constructors ​

Constructor ​

new MemCacheStore(app?, options?): MemCacheStore

Defined in: packages/actionpack/lib/action-dispatch/middleware/session/mem-cache-store.ts:21

Parameters ​

ParameterType
app?RackApp
options?MemCacheStoreSessionOptions

Returns ​

MemCacheStore

Overrides ​

CacheStore.constructor

Properties ​

app ​

protected app: RackApp | undefined

Defined in: packages/rack-session/dist/abstract/id.d.ts:99

Inherited from ​

CacheStore.app


assumeSsl ​

protected assumeSsl: unknown

Defined in: packages/rack-session/dist/abstract/id.d.ts:100

Inherited from ​

CacheStore.assumeSsl


cookieOnly ​

protected cookieOnly: unknown

Defined in: packages/rack-session/dist/abstract/id.d.ts:101

Inherited from ​

CacheStore.cookieOnly


defaultOptions ​

defaultOptions: Record<string, unknown> & { secureRandom?: unknown; sidbits?: number; }

Defined in: packages/rack-session/dist/abstract/id.d.ts:93

Type Declaration ​

secureRandom? ​

optional secureRandom?: unknown

sidbits? ​

optional sidbits?: number

Inherited from ​

CacheStore.defaultOptions


key ​

key: string

Defined in: packages/rack-session/dist/abstract/id.d.ts:92

Inherited from ​

CacheStore.key


sameSite ​

sameSite: unknown

Defined in: packages/rack-session/dist/abstract/id.d.ts:98

Inherited from ​

CacheStore.sameSite


sidbits ​

protected sidbits: number

Defined in: packages/rack-session/dist/abstract/id.d.ts:102

Inherited from ​

CacheStore.sidbits


sidLength ​

protected sidLength: number

Defined in: packages/rack-session/dist/abstract/id.d.ts:103

Inherited from ​

CacheStore.sidLength


sidSecure ​

sidSecure: unknown

Defined in: packages/rack-session/dist/abstract/id.d.ts:97

Inherited from ​

CacheStore.sidSecure


DEFAULT_OPTIONS ​

static DEFAULT_OPTIONS: Readonly<Record<string, unknown>>

Defined in: packages/rack-session/dist/abstract/id.d.ts:109

Inherited from ​

CacheStore.DEFAULT_OPTIONS


LOADED_SESSION_ID ​

readonly static LOADED_SESSION_ID: "action_dispatch.session.cache_store.loaded_session_id" = "action_dispatch.session.cache_store.loaded_session_id"

Defined in: packages/actionpack/lib/action-dispatch/middleware/session/cache-store.ts:21

Inherited from ​

CacheStore.LOADED_SESSION_ID


SecureSessionHash ​

static SecureSessionHash: typeof SecureSessionHash

Defined in: packages/rack-session/dist/abstract/id.d.ts:155

Inherited from ​

CacheStore.SecureSessionHash

Methods ​

call() ​

call(env): Promise<RackResponse>

Defined in: packages/rack-session/dist/abstract/id.d.ts:110

Parameters ​

ParameterType
envRackEnv

Returns ​

Promise<RackResponse>

Inherited from ​

CacheStore.call


commitSession() ​

commitSession(req, res): Promise<unknown>

Defined in: packages/rack-session/dist/abstract/id.d.ts:140

Parameters ​

ParameterType
reqPersistedRequest
resRaw

Returns ​

Promise<unknown>

Inherited from ​

CacheStore.commitSession


context() ​

context(env, app?): Promise<RackResponse>

Defined in: packages/rack-session/dist/abstract/id.d.ts:111

Parameters ​

ParameterType
envRackEnv
app?RackApp

Returns ​

Promise<RackResponse>

Inherited from ​

CacheStore.context


deleteSession() ​

deleteSession(_env, sid, _options?): Promise<SessionId>

Defined in: packages/actionpack/lib/action-dispatch/middleware/session/cache-store.ts:78

Parameters ​

ParameterType
_envunknown
sidSessionId
_options?object

Returns ​

Promise<SessionId>

Inherited from ​

CacheStore.deleteSession


findSession() ​

findSession(req, sid): Promise<[SessionId, Record<string, unknown>]>

Defined in: packages/actionpack/lib/action-dispatch/middleware/session/cache-store.ts:44

Parameters ​

ParameterType
reqCacheStoreRequest
sidSessionId | null | undefined

Returns ​

Promise<[SessionId, Record<string, unknown>]>

Inherited from ​

CacheStore.findSession


generateSid() ​

generateSid(): SessionId

Defined in: packages/actionpack/lib/action-dispatch/middleware/session/abstract-store.ts:138

Returns ​

SessionId

Inherited from ​

CacheStore.generateSid


writeSession() ​

writeSession(req, sid, session, options?): Promise<false | SessionId>

Defined in: packages/actionpack/lib/action-dispatch/middleware/session/cache-store.ts:57

Parameters ​

ParameterType
reqCacheStoreRequest
sidSessionId
sessionRecord<string, unknown> | null
options?object

Returns ​

Promise<false | SessionId>

Inherited from ​

CacheStore.writeSession