cache.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?php
  2. return
  3. [
  4. /**
  5. * ---------------------------------------------------------
  6. * Default
  7. * ---------------------------------------------------------
  8. *
  9. * Default configuration to use.
  10. */
  11. 'default' => 'file',
  12. /**
  13. * ---------------------------------------------------------
  14. * Configurations
  15. * ---------------------------------------------------------
  16. *
  17. * You can define as many cache configurations as you want.
  18. *
  19. * The supported cache types are: "apcu", "database", "file", "memcache", "memcached", "memory", "null", "redis", wincache", "zenddisk" and "zendmemory".
  20. *
  21. * type : Cache type you want to use.
  22. * prefix : Cache prefix that should be unique to your application to avoid conflicts.
  23. * path : Cache path (only required when using "file" cache).
  24. * compress_data: Compress stored items? (this requires zlib and is only available when using "memcache" or "memcached" cache).
  25. * timeout : Value in seconds which will be used for connecting to the daemon (only required when using "memcache" or "memcached" cache).
  26. * servers : Cache servers (you can use multiple servers and it is only required when using "memcache" or "memcached" cache).
  27. * configuration: Configuration to use for caching (only required when using "database" or "redis" cache).
  28. * table : Name of the database table (only required when using "database" cache).
  29. */
  30. 'configurations' =>
  31. [
  32. 'apcu' =>
  33. [
  34. 'type' => 'apcu',
  35. 'prefix' => 'mako',
  36. ],
  37. 'database' =>
  38. [
  39. 'type' => 'database',
  40. 'prefix' => 'mako',
  41. 'configuration' => 'test',
  42. 'table' => 'mako_cache',
  43. ],
  44. 'file' =>
  45. [
  46. 'type' => 'file',
  47. 'prefix' => 'mako',
  48. 'path' => MAKO_APPLICATION_PATH . '/storage/cache',
  49. ],
  50. 'memcache' =>
  51. [
  52. 'type' => 'memcache',
  53. 'prefix' => 'mako',
  54. 'compress_data' => false,
  55. 'timeout' => 1,
  56. 'servers' =>
  57. [
  58. 'server_1' =>
  59. [
  60. 'server' => 'localhost',
  61. 'port' => '11211',
  62. 'persistent_connection' => false,
  63. 'weight' => 1,
  64. ],
  65. ],
  66. ],
  67. 'memcached' =>
  68. [
  69. 'type' => 'memcached',
  70. 'prefix' => 'mako',
  71. 'compress_data' => false,
  72. 'timeout' => 1,
  73. 'servers' =>
  74. [
  75. 'server_1' =>
  76. [
  77. 'server' => 'localhost',
  78. 'port' => '11211',
  79. 'weight' => 1,
  80. ],
  81. ],
  82. ],
  83. 'memory' =>
  84. [
  85. 'type' => 'memory',
  86. ],
  87. 'null' =>
  88. [
  89. 'type' => 'null',
  90. ],
  91. 'redis' =>
  92. [
  93. 'type' => 'redis',
  94. 'prefix' => 'mako',
  95. 'configuration' => 'cache',
  96. ],
  97. 'wincache' =>
  98. [
  99. 'type' => 'wincache',
  100. 'prefix' => 'mako',
  101. ],
  102. 'zenddisk' =>
  103. [
  104. 'type' => 'zenddisk',
  105. 'prefix' => 'mako',
  106. ],
  107. 'zendmemory' =>
  108. [
  109. 'type' => 'zendmemory',
  110. 'prefix' => 'mako',
  111. ],
  112. ],
  113. ];