You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
647 B
33 lines
647 B
import Session, { SessionData } from './Session.ts'
|
|
|
|
export default class MemorySession extends Session {
|
|
private _key!: string
|
|
private _data: SessionData = {}
|
|
|
|
public get_key(): string {
|
|
return this._key
|
|
}
|
|
|
|
public set_key(key: string) {
|
|
this._key = key
|
|
}
|
|
|
|
public get_data(): SessionData {
|
|
return this._data
|
|
}
|
|
|
|
public set_data(data: SessionData) {
|
|
this._data = data
|
|
}
|
|
|
|
public get_attribute(key: string): any {
|
|
return this._data[key]
|
|
}
|
|
|
|
public set_attribute(key: string, value: any) {
|
|
this._data[key] = value
|
|
}
|
|
|
|
public async persist() {}
|
|
}
|