Skip to content

Commit c2443c5

Browse files
authored
Merge pull request #5 from UrosPurtic/master
add metadata to cache files
2 parents 67065b6 + d29db3a commit c2443c5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/G4/Mcache/Driver/File.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,14 @@ public function set($key, $value, $expiration)
3939
{
4040
$realCachePath = $this->formatCacheFilename($key);
4141

42-
$toSave = "<?php return \n" . var_export($value, true) . ';';
42+
$toSave = "<?php
43+
/**
44+
Config filename: " . json_decode($value, true)['pathname'] . "
45+
Environment: " . APPLICATION_ENV . "
46+
Date created: " . date("Y-m-d H:i:s") . "
47+
KEY ( md5 value of usersOnline.UserId and driver prefix ) : " . $key . "
48+
*/
49+
return \n" . var_export($value, true) . ';';
4350

4451
if(!touch($realCachePath)) {
4552
throw new \Exception('Cache file path is not writable');

0 commit comments

Comments
 (0)