Add support for Memcached/Improve database cache

- Create Cache Driver interface
- Update cache table fields
- Add CacheSessionHandler
This commit is contained in:
Hypolite Petovan 2018-02-28 23:48:09 -05:00
parent 7bd4a52156
commit 3628b62aeb
9 changed files with 326 additions and 192 deletions

View file

@ -712,16 +712,16 @@ class DBStructure
]
];
$database["cache"] = [
"comment" => "Used to store different data that doesn't to be stored for a long time",
"comment" => "Stores temporary data",
"fields" => [
"k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => ""],
"v" => ["type" => "mediumtext", "comment" => ""],
"expire_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
"updated" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
"k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "cache key"],
"v" => ["type" => "mediumtext", "comment" => "cached serialized value"],
"expires" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => "datetime of cache expiration"],
"updated" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => "datetime of cache insertion"],
],
"indexes" => [
"PRIMARY" => ["k"],
"expire_mode_updated" => ["expire_mode", "updated"],
"k_expires" => ["k", "expires"],
]
];
$database["challenge"] = [