cache.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. return [
  3. /*
  4. 'default' => 'file', // allows to specify default cache directl from config file
  5. 'prefix' => 'cache1_', //used to avoid duplicates when using _sanitize_id
  6. 'apcu' => array(
  7. 'driver' => 'apcu',
  8. 'default_expire' => 3600,
  9. 'prefix' => 'cache_apcu_', // if set uses this prefix instead of global 'prefix'
  10. ),
  11. 'memcache' => array(
  12. 'driver' => 'memcache',
  13. 'default_expire' => 3600,
  14. 'compression' => FALSE, // Use Zlib compression (can cause issues with integers)
  15. 'servers' => array(
  16. 'local' => array(
  17. 'host' => 'localhost', // Memcache Server
  18. 'port' => 11211, // Memcache port number
  19. 'persistent' => FALSE, // Persistent connection
  20. 'weight' => 1,
  21. 'timeout' => 1,
  22. 'retry_interval' => 15,
  23. 'status' => TRUE,
  24. ),
  25. ),
  26. 'instant_death' => TRUE, // Take server offline immediately on first fail (no retry)
  27. ),
  28. 'memcachetag' => array(
  29. 'driver' => 'memcachetag',
  30. 'default_expire' => 3600,
  31. 'compression' => FALSE, // Use Zlib compression (can cause issues with integers)
  32. 'servers' => array(
  33. 'local' => array(
  34. 'host' => 'localhost', // Memcache Server
  35. 'port' => 11211, // Memcache port number
  36. 'persistent' => FALSE, // Persistent connection
  37. 'weight' => 1,
  38. 'timeout' => 1,
  39. 'retry_interval' => 15,
  40. 'status' => TRUE,
  41. ),
  42. ),
  43. 'instant_death' => TRUE,
  44. ),
  45. 'wincache' => array(
  46. 'driver' => 'wincache',
  47. 'default_expire' => 3600,
  48. ),
  49. 'sqlite' => array(
  50. 'driver' => 'sqlite',
  51. 'default_expire' => 3600,
  52. 'database' => APPPATH.'cache/kohana-cache.sql3',
  53. 'schema' => 'CREATE TABLE caches(id VARCHAR(127) PRIMARY KEY, tags VARCHAR(255), expiration INTEGER, cache TEXT)',
  54. ),
  55. 'eaccelerator' => array(
  56. 'driver' => 'eaccelerator',
  57. ),
  58. 'xcache' => array(
  59. 'driver' => 'xcache',
  60. 'default_expire' => 3600,
  61. ),
  62. 'file' => array(
  63. 'driver' => 'file',
  64. 'cache_dir' => APPPATH.'cache',
  65. 'default_expire' => 3600,
  66. 'ignore_on_delete' => array(
  67. '.gitignore',
  68. '.git',
  69. '.svn'
  70. )
  71. )
  72. */
  73. ];