XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
XCube_RenderCache.class.php
1<?php
11
13 public $mCacheId;
14 public $mResourceName;
15
16 public function __construct() {
17 }
18
24 public function isCache( $cachetime = null ) {
25 }
26
30 public function enableCache(): bool
31 {
32 return true;
33 }
34
35 public function setResourceName( $name ) {
36 $this->mResourceName = $name;
37 }
38
42 public function getCacheId(): string
43 {
44 }
45
49 public function _getFileName(): string
50 {
51 }
52
53 public function save( $renderTarget ) {
54 if ( $this->enableCache() ) {
55 $filename = $this->_getFileName();
56 $fp = fopen( $filename, 'wb' );
57 fwrite( $fp, $renderTarget->getResult() );
58 fclose( $fp );
59 }
60 }
61
62 public function load() {
63 if ( $this->isCache() ) {
64 return file_get_contents( $this->_getFileName() );
65 }
66 }
67
68 public function clear() {
69 }
70
71 public function reset() {
72 $this->mResourceName = null;
73 }
74}