Class HTTP::CookieJar::MozillaStore
In: lib/http/cookie_jar/mozilla_store.rb
Parent: AbstractStore

A store class that uses Mozilla compatible SQLite3 database as backing store.

Session cookies are stored separately on memory and will not be stored persistently in the SQLite3 database.

Methods

Attributes

filename  [R]  The file name of the SQLite3 database given in initialization.

Public Class methods

Generates a Mozilla cookie store. If the file does not exist, it is created. If it does and its schema is old, it is automatically upgraded with a new schema keeping the existing data.

Available option keywords are as below:

:filename : A file name of the SQLite3 database to open. This option is mandatory.

:gc_threshold : GC threshold; A GC happens when this many times cookies have been stored (default: `HTTP::Cookie::MAX_COOKIES_TOTAL / 20`)

:app_id : application ID (default: `0`) to have per application jar.

:in_browser_element : a flag to tell if cookies are stored in an in browser element. (default: `false`)

Public Instance methods

Closes the SQLite3 database. After closing, any operation may raise an error.

Tests if the SQLite3 database is closed.

Raises TypeError. Cloning is inhibited in this store class.

Returns the schema version of the database.

Protected Instance methods

[Validate]