|
1 | 1 | <?php |
2 | 2 |
|
3 | 3 | return [ |
4 | | - 'type' => 'file', // or Redis |
5 | | - 'ttl' => 3600, // an hour |
6 | | - 'timeout' => 30, // seconds |
7 | | - 'max_content_length' => 10485760, // 10MB |
8 | | - |
9 | | - 'filter_url_status' => true, |
10 | | - 'blacklist' => [ |
11 | | - 'zoomit.ir', |
| 4 | + /** |
| 5 | + * -------------------------- |
| 6 | + * Default Driver |
| 7 | + * -------------------------- |
| 8 | + * |
| 9 | + * Handle caches with difference strategies, |
| 10 | + * like: `file`, `database`, `redis` |
| 11 | + */ |
| 12 | + 'driver' => 'file', |
| 13 | + |
| 14 | + /** |
| 15 | + * -------------------------- |
| 16 | + * Time to Live |
| 17 | + * -------------------------- |
| 18 | + * |
| 19 | + * This parameter is cache time to live in seconds for outdate cache |
| 20 | + * data and cache new data. |
| 21 | + */ |
| 22 | + 'ttl' => 3600, |
| 23 | + |
| 24 | + /** |
| 25 | + * -------------------------- |
| 26 | + * Request time out |
| 27 | + * -------------------------- |
| 28 | + * |
| 29 | + * This parameter indicates request time out in seconds |
| 30 | + * to the origin URL. |
| 31 | + */ |
| 32 | + 'timeout' => 30, |
| 33 | + |
| 34 | + /** |
| 35 | + * -------------------------- |
| 36 | + * Filter URL |
| 37 | + * -------------------------- |
| 38 | + * This parameter enable/disable filter origin URL. |
| 39 | + * |
| 40 | + */ |
| 41 | + 'filter_url_enable' => true, |
| 42 | + |
| 43 | + /** |
| 44 | + * -------------------------- |
| 45 | + * List of filterd URL |
| 46 | + * -------------------------- |
| 47 | + * This parameter idicates filterd URL. |
| 48 | + * |
| 49 | + */ |
| 50 | + 'filter_url_list' => [ |
| 51 | + // 'malicious_url.com', |
| 52 | + ], |
| 53 | + |
| 54 | + /** |
| 55 | + * -------------------------- |
| 56 | + * File caching driver |
| 57 | + * -------------------------- |
| 58 | + * This driver caches the content of the origin into the file. |
| 59 | + * |
| 60 | + */ |
| 61 | + 'file' => [ |
| 62 | + /** |
| 63 | + * File content limitation |
| 64 | + */ |
| 65 | + 'max_content_length' => 10485760, // 10MB |
12 | 66 | ], |
13 | 67 | ]; |
0 commit comments