Skip to content

Commit e28a015

Browse files
committed
Merge pull request #268 from khoaofgod/final
Fix Tags & Search
2 parents 0ad02f4 + 3760bd6 commit e28a015

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

examples/Search.YourCaching.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
// In your class, function, you can call the Cache
3333
$cache = CacheManager::Files();
3434

35+
echo "<b>Testing Search:</b>";
36+
3537
$keyword1 = "my_apple_keyword";
3638
$value1 = "Apple is good";
3739
$cache->set($keyword1,$value1);
@@ -80,3 +82,8 @@
8082
[my_iphone_keyword] => Android is better than iphone for sure
8183
)
8284
*/
85+
86+
echo "<hr>";
87+
echo "<b>Testing Tags:</b>";
88+
89+
include_once __DIR__."/Tags.YourCaching.php";

src/phpFastCache/Core/DriverAbstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function set($keyword, $value = '', $time = 0, $option = array())
108108

109109
// handle search
110110
if (isset($this->config[ 'allow_search' ]) && $this->config[ 'allow_search' ] == true) {
111-
$option[ 'tags' ] = array("search");
111+
$option[ 'tags' ][] = "search";
112112
}
113113

114114
// handle tags

0 commit comments

Comments
 (0)