Skip to content

Commit 38042de

Browse files
committed
Add config cache main_cache_adapter
1 parent 900eacc commit 38042de

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
Change Log được viết theo biểu mẫu tại đây: https://keepachangelog.com/en/1.0.0/
44

5+
## [1.1.7] - 2024/09/08
6+
7+
### What's Changed
8+
9+
- [x] Add config cache `main_cache_adapter`
10+
- [x] Add constants `GLOBAL_CACHE_PREFIX`
11+
12+
## [1.1.6] - 2024/08/22
13+
14+
### What's Changed
15+
16+
- [x] Update config `cache_path`
17+
518
## [1.1.5] - 2024/08/04
619

720
### What's Changed

app/config/config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,7 @@
541541

542542
require_once __DIR__ . '/hmvc.php';
543543
require_once __DIR__ . '/extend/admin_config.php';
544+
require_once __DIR__ . '/extend/config_cache.php';
544545
require_once __DIR__ . '/extend/config_site.php';
545546
require_once __DIR__ . '/extend/config_template.php';
546547
require_once __DIR__ . '/extend/config_hashids.php';

app/config/constants.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@
9292
defined('EXIT__AUTO_MAX') or define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
9393
// Custom Constants
9494
defined('_PROCESS_TEST_') or define('_PROCESS_TEST_', false);
95-
defined('CACHE_KEY') or define('CACHE_KEY', 'BEAR_CUTE33_');
95+
defined('CACHE_KEY') or define('CACHE_KEY', 'Bear-CodeIgniter-v3-Skeleton-Cache-');
96+
defined('GLOBAL_CACHE_PREFIX') or define('GLOBAL_CACHE_PREFIX', CACHE_KEY);
9697
defined('MY_TELEGRAM_ID') or define('MY_TELEGRAM_ID', '1234');
9798
defined('TELEGRAM_JARVIS_BOT') or define('TELEGRAM_JARVIS_BOT', [
9899
'telegram_messages' => [

app/config/extend/config_cache.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
defined('BASEPATH') or exit('No direct script access allowed');
4+
5+
$xadb0VEa_MainCacheAdapter = extension_loaded('apcu') ? 'apcu' : 'file';
6+
$xadb0VEa_MainCacheBackup = $xadb0VEa_MainCacheAdapter === 'file' ? 'dummy' : 'file';
7+
$config['main_cache_adapter'] = [
8+
'adapter' => $xadb0VEa_MainCacheAdapter,
9+
'backup' => $xadb0VEa_MainCacheBackup,
10+
'key_prefix' => GLOBAL_CACHE_PREFIX
11+
];

0 commit comments

Comments
 (0)