File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -318,11 +318,12 @@ public function cacheBaseTags(array $tags = [])
318318 /**
319319 * Use a plain key instead of a hashed one in the cache driver.
320320 *
321+ * @param bool $usePlainKey
321322 * @return \Rennokki\QueryCache\Traits\QueryCacheModule
322323 */
323- public function withPlainKey ()
324+ public function withPlainKey (bool $ usePlainKey = true )
324325 {
325- $ this ->cacheUsePlainKey = true ;
326+ $ this ->cacheUsePlainKey = $ usePlainKey ;
326327
327328 return $ this ;
328329 }
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ public function test_cache_flush_with_default_tags_attached()
119119 public function test_hashed_key ()
120120 {
121121 $ kid = factory (Kid::class)->create ();
122- $ storedKid = Kid::cacheFor (now ()->addHours (1 ))->first ();
122+ $ storedKid = Kid::cacheFor (now ()->addHours (1 ))->withPlainKey ( false )-> first ();
123123 $ cache = Cache::get ('leqc:156667fa9bcb7fb8abb01018568648406f251ef65736e89e6fd27d08bc48b5bb ' );
124124
125125 $ this ->assertNotNull ($ cache );
You can’t perform that action at this time.
0 commit comments