8
|
1 DROP TABLE cache;
|
|
2 DROP TABLE cache_shared;
|
|
3
|
|
4 CREATE TABLE cache (
|
|
5 user_id integer NOT NULL default 0,
|
|
6 cache_key varchar(128) NOT NULL default '',
|
|
7 expires datetime DEFAULT NULL,
|
|
8 data text NOT NULL,
|
|
9 PRIMARY KEY (user_id, cache_key)
|
|
10 );
|
|
11
|
|
12 CREATE INDEX ix_cache_expires ON cache(expires);
|
|
13
|
|
14 CREATE TABLE cache_shared (
|
|
15 cache_key varchar(255) NOT NULL,
|
|
16 expires datetime DEFAULT NULL,
|
|
17 data text NOT NULL,
|
|
18 PRIMARY KEY (cache_key)
|
|
19 );
|
|
20
|
|
21 CREATE INDEX ix_cache_shared_expires ON cache_shared(expires);
|