Skip to content

Commit

Permalink
CachingService::cache renamed to store;
Browse files Browse the repository at this point in the history
  • Loading branch information
hans-thomas committed Jun 13, 2023
1 parent 9829159 commit 74bedcc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Facades/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use RuntimeException;

/**
* @method static mixed cache( string $key, callable $data )
* @method static mixed store( string $key, callable $data )
* @method static int getInterval()
* @method static CachingService setInterval( int $minutes )
* @method static CachingService setService( Service $service )
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Caching/CachingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct(
*
* @return mixed
*/
public function cache( string $key, callable $data ): mixed {
public function store( string $key, callable $data ): mixed {
return $this->remember( 'cache', [ $key ], $data );
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/Services/CachingServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function cache(): void {
Cache::shouldReceive( 'remember' )
->once();

ValravnCacheFacade::cache( '10/12', fn() => 10 / 12 );
ValravnCacheFacade::store( 'unique_key', fn() => 10 / 12 );
}


Expand Down

0 comments on commit 74bedcc

Please sign in to comment.