-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add `get`, `write` and `forget` cache events * formatting * formatting * formatting --------- Co-authored-by: Taylor Otwell <taylor@laravel.com>
- Loading branch information
1 parent
af3648f
commit 96eeea7
Showing
10 changed files
with
256 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Illuminate\Cache\Events; | ||
|
||
class ForgettingKey extends CacheEvent | ||
{ | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Illuminate\Cache\Events; | ||
|
||
class KeyForgetFailed extends CacheEvent | ||
{ | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
namespace Illuminate\Cache\Events; | ||
|
||
class KeyWriteFailed extends CacheEvent | ||
{ | ||
/** | ||
* The value that would have been written. | ||
* | ||
* @var mixed | ||
*/ | ||
public $value; | ||
|
||
/** | ||
* The number of seconds the key should have been valid. | ||
* | ||
* @var int|null | ||
*/ | ||
public $seconds; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param string|null $storeName | ||
* @param string $key | ||
* @param mixed $value | ||
* @param int|null $seconds | ||
* @param array $tags | ||
* @return void | ||
*/ | ||
public function __construct($storeName, $key, $value, $seconds = null, $tags = []) | ||
{ | ||
parent::__construct($storeName, $key, $tags); | ||
|
||
$this->value = $value; | ||
$this->seconds = $seconds; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Illuminate\Cache\Events; | ||
|
||
class RetrievingKey extends CacheEvent | ||
{ | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Illuminate\Cache\Events; | ||
|
||
class RetrievingManyKeys extends CacheEvent | ||
{ | ||
/** | ||
* The keys that are being retrieved. | ||
* | ||
* @var array | ||
*/ | ||
public $keys; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param string|null $storeName | ||
* @param array $keys | ||
* @param array $tags | ||
* @return void | ||
*/ | ||
public function __construct($storeName, $keys, array $tags = []) | ||
{ | ||
parent::__construct($storeName, $keys[0] ?? '', $tags); | ||
|
||
$this->keys = $keys; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
namespace Illuminate\Cache\Events; | ||
|
||
class WritingKey extends CacheEvent | ||
{ | ||
/** | ||
* The value that will be written. | ||
* | ||
* @var mixed | ||
*/ | ||
public $value; | ||
|
||
/** | ||
* The number of seconds the key should be valid. | ||
* | ||
* @var int|null | ||
*/ | ||
public $seconds; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param string|null $storeName | ||
* @param string $key | ||
* @param mixed $value | ||
* @param int|null $seconds | ||
* @param array $tags | ||
* @return void | ||
*/ | ||
public function __construct($storeName, $key, $value, $seconds = null, $tags = []) | ||
{ | ||
parent::__construct($storeName, $key, $tags); | ||
|
||
$this->value = $value; | ||
$this->seconds = $seconds; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
namespace Illuminate\Cache\Events; | ||
|
||
class WritingManyKeys extends CacheEvent | ||
{ | ||
/** | ||
* The keys that are being written. | ||
* | ||
* @var mixed | ||
*/ | ||
public $keys; | ||
|
||
/** | ||
* The value that is being written. | ||
* | ||
* @var mixed | ||
*/ | ||
public $values; | ||
|
||
/** | ||
* The number of seconds the keys should be valid. | ||
* | ||
* @var int|null | ||
*/ | ||
public $seconds; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param string|null $storeName | ||
* @param array $keys | ||
* @param array $values | ||
* @param int|null $seconds | ||
* @param array $tags | ||
* @return void | ||
*/ | ||
public function __construct($storeName, $keys, $values, $seconds = null, $tags = []) | ||
{ | ||
parent::__construct($storeName, $keys[0], $tags); | ||
|
||
$this->keys = $keys; | ||
$this->values = $values; | ||
$this->seconds = $seconds; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.