caching\DbCache $cacheTable

$cacheTable public property

Name of the DB table to store cache content. The table should be pre-created as follows:

CREATE TABLE cache (
    id char(128) NOT NULL PRIMARY KEY,
    expire int(11),
    data BLOB
);

where 'BLOB' refers to the BLOB-type of your preferred DBMS. Below are the BLOB type that can be used for some popular DBMS:

  • MySQL: LONGBLOB
  • PostgreSQL: BYTEA
  • MSSQL: BLOB

When using DbCache in a production server, we recommend you create a DB index for the 'expire' column in the cache table to improve the performance.

public string $cacheTable = '{{%cache}}'
doc_Yii
2016-10-30 16:53:56
Comments
Leave a Comment

Please login to continue.