server/src/config/cache.php
changeset 2 00e2916104fe
parent 1 01a844d292ac
child 20 a9b98b16b053
equal deleted inserted replaced
1:01a844d292ac 2:00e2916104fe
     1 <?php
     1 <?php
     2 
     2 
     3 return [
     3 return [
     4 
     4 
     5 	/*
     5     /*
     6 	|--------------------------------------------------------------------------
     6     |--------------------------------------------------------------------------
     7 	| Default Cache Store
     7     | Default Cache Store
     8 	|--------------------------------------------------------------------------
     8     |--------------------------------------------------------------------------
     9 	|
     9     |
    10 	| This option controls the default cache connection that gets used while
    10     | This option controls the default cache connection that gets used while
    11 	| using this caching library. This connection is used when another is
    11     | using this caching library. This connection is used when another is
    12 	| not explicitly specified when executing a given caching function.
    12     | not explicitly specified when executing a given caching function.
    13 	|
    13     |
    14 	*/
    14     */
    15 
    15 
    16 	'default' => env('CACHE_DRIVER', 'file'),
    16     'default' => env('CACHE_DRIVER', 'file'),
    17 
    17 
    18 	/*
    18     /*
    19 	|--------------------------------------------------------------------------
    19     |--------------------------------------------------------------------------
    20 	| Cache Stores
    20     | Cache Stores
    21 	|--------------------------------------------------------------------------
    21     |--------------------------------------------------------------------------
    22 	|
    22     |
    23 	| Here you may define all of the cache "stores" for your application as
    23     | Here you may define all of the cache "stores" for your application as
    24 	| well as their drivers. You may even define multiple stores for the
    24     | well as their drivers. You may even define multiple stores for the
    25 	| same cache driver to group types of items stored in your caches.
    25     | same cache driver to group types of items stored in your caches.
    26 	|
    26     |
    27 	*/
    27     */
    28 
    28 
    29 	'stores' => [
    29     'stores' => [
    30 
    30 
    31 		'apc' => [
    31         'apc' => [
    32 			'driver' => 'apc'
    32             'driver' => 'apc',
    33 		],
    33         ],
    34 
    34 
    35 		'array' => [
    35         'array' => [
    36 			'driver' => 'array'
    36             'driver' => 'array',
    37 		],
    37         ],
    38 
    38 
    39 		'database' => [
    39         'database' => [
    40 			'driver' => 'database',
    40             'driver' => 'database',
    41 			'table'  => 'cache',
    41             'table' => 'cache',
    42 			'connection' => null,
    42             'connection' => null,
    43 		],
    43         ],
    44 
    44 
    45 		'file' => [
    45         'file' => [
    46 			'driver' => 'file',
    46             'driver' => 'file',
    47 			'path'   => storage_path().'/framework/cache',
    47             'path' => storage_path().'/framework/cache',
    48 		],
    48         ],
    49 
    49 
    50 		'memcached' => [
    50         'memcached' => [
    51 			'driver'  => 'memcached',
    51             'driver' => 'memcached',
    52 			'servers' => [
    52             'servers' => [
    53 				[
    53                 [
    54 					'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100
    54                     'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100,
    55 				],
    55                 ],
    56 			],
    56             ],
    57 		],
    57         ],
    58 
    58 
    59 		'redis' => [
    59         'redis' => [
    60 			'driver' => 'redis',
    60             'driver' => 'redis',
    61 			'connection' => 'default',
    61             'connection' => 'default',
    62 		],
    62         ],
    63 
    63 
    64 	],
    64     ],
    65 
    65 
    66 	/*
    66     /*
    67 	|--------------------------------------------------------------------------
    67     |--------------------------------------------------------------------------
    68 	| Cache Key Prefix
    68     | Cache Key Prefix
    69 	|--------------------------------------------------------------------------
    69     |--------------------------------------------------------------------------
    70 	|
    70     |
    71 	| When utilizing a RAM based store such as APC or Memcached, there might
    71     | When utilizing a RAM based store such as APC or Memcached, there might
    72 	| be other applications utilizing the same cache. So, we'll specify a
    72     | be other applications utilizing the same cache. So, we'll specify a
    73 	| value to get prefixed to all our keys so we can avoid collisions.
    73     | value to get prefixed to all our keys so we can avoid collisions.
    74 	|
    74     |
    75 	*/
    75     */
    76 
    76 
    77 	'prefix' => 'laravel',
    77     'prefix' => 'laravel',
    78 
    78 
    79 ];
    79 ];