diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-26 21:43:02 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-26 21:43:02 +0300 |
| commit | 546daa78721e6abdbc89afcecc158118c2239865 (patch) | |
| tree | ae68219fb5ab69fd45d615cf059cc5d0ea279355 /public/app/extends/Cache_service.php | |
| parent | 9cb35f2bf2127cc8ac077aae17514a57e576217d (diff) | |
| download | classroom-546daa78721e6abdbc89afcecc158118c2239865.tar.gz classroom-546daa78721e6abdbc89afcecc158118c2239865.tar.bz2 classroom-546daa78721e6abdbc89afcecc158118c2239865.zip | |
alfa.3 version; backend designer and front-end embeder enabled
Diffstat (limited to 'public/app/extends/Cache_service.php')
| -rw-r--r-- | public/app/extends/Cache_service.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/public/app/extends/Cache_service.php b/public/app/extends/Cache_service.php index 9aac1d0..52311f3 100644 --- a/public/app/extends/Cache_service.php +++ b/public/app/extends/Cache_service.php @@ -45,5 +45,38 @@ class Cache_service ); } + public static function pages_list( $options = 0 ) + { + return proxy( + [\app\models\cms\Course_model::class, 'pages'], + [], CACHE_ROOT_TTL, + $options + ); + } + + + /** entity + * + * create and retrieve a cached array of some entity + * + * @param $entiry (string|method): method of the main CMS model + * NOTE: CRITICAL: method must exist in the main CMS model + */ + public static function entity( $entity, $options = 0 ) + { + $allowed_methods = [ // to make sure method existence + 'page', + 'course', + 'lesson', + ]; + + // TODO: needs testing before release + // return proxy( + // [\app\models\admin\Course_model::class, $entity], + // [], CACHE_ROOT_TTL, + // $options + // ); + } + }
\ No newline at end of file |
