diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-25 03:40:09 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-25 03:40:09 +0300 |
| commit | 65d07ba64d45c77d2db16272710ec5702b34d641 (patch) | |
| tree | 4578793e288cd1a6dc08f87ab44d0e3568904c12 /public/app/extends | |
| parent | 13753d58d6aceaea8f246040518d50f2eb06a8d9 (diff) | |
| download | classroom-65d07ba64d45c77d2db16272710ec5702b34d641.tar.gz classroom-65d07ba64d45c77d2db16272710ec5702b34d641.tar.bz2 classroom-65d07ba64d45c77d2db16272710ec5702b34d641.zip | |
front-end: putting everything together
Diffstat (limited to 'public/app/extends')
| -rw-r--r-- | public/app/extends/Cache_service.php | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/public/app/extends/Cache_service.php b/public/app/extends/Cache_service.php new file mode 100644 index 0000000..e44cc8e --- /dev/null +++ b/public/app/extends/Cache_service.php @@ -0,0 +1,45 @@ +<?php +namespace app\extends; + +use app\models\cms\Course_model; +use app\models\admin\Privilege_model; + +/** Cache service + * ----------------------------------------------------------------------------- + * + * class that gathers common source-expensive queries + * and helps for performance optimization + * + */ +class Cache_service +{ + + public static function courses_struct( $options = 0 ) + { + return proxy( // cache-get categories + [\app\models\cms\Course_model::class, 'courses_struct'], + [], CACHE_ROOT_TTL, $options + ); + } + + public static function files_attributes( $options = 0 ) + { + return proxy( + [\app\models\cms\Course_model::class, 'files'], + [], CACHE_ROOT_TTL, $options + ); + } + + + public static function privileges_hierarchy( $options = 0 ) + { + return proxy( + [\app\models\admin\Privilege_model::class, 'privileges'], + [], CACHE_ROOT_TTL, $options + ); + } + + + + +}
\ No newline at end of file |
