MCPcopy Create free account
hub / github.com/adonisjs/session / forget

Method forget

src/session.ts:338–340  ·  view source on GitHub ↗

* Removes a key from the session datastore * * @param key - The key to remove * * @example * session.forget('temp_data') * session.forget('user.cache')

(key: string)

Source from the content-addressed store, hash-verified

336 * session.forget('user.cache')
337 */
338 forget(key: string) {
339 return this.#getValuesStore('write').unset(key)
340 }
341
342 /**
343 * Reads value for a key from the session datastore and removes it simultaneously

Callers 2

clearIntendedUrlMethod · 0.95
session.spec.tsFile · 0.80

Calls 2

#getValuesStoreMethod · 0.95
unsetMethod · 0.80

Tested by

no test coverage detected