mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Fixed some cache issues (#1557)
* Fixed some cache issues * Update CHANGELOG.md
This commit is contained in:
parent
4e853253b6
commit
db19ca6ecc
6 changed files with 11 additions and 11 deletions
|
@ -8,7 +8,7 @@
|
|||
- Release 2.4.4 🦩 ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Supports PHP 8.2 / PHP 8.3 ([belomaxorka](https://github.com/belomaxorka))
|
||||
- CWE-502 Fixed: Deserialization of untrusted data ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Refactored cache drivers 🗃 [\#1553](https://github.com/torrentpier/torrentpier/pull/1553) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Refactored cache drivers 🗃 [\#1553](https://github.com/torrentpier/torrentpier/pull/1553), [\#1557](https://github.com/torrentpier/torrentpier/pull/1557) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Create tech stack docs (techstack.yml and techstack.md) [\#1521](https://github.com/torrentpier/torrentpier/pull/1521), [\#1522](https://github.com/torrentpier/torrentpier/pull/1522) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Added MonsterID avatars support 🎇 [\#1546](https://github.com/torrentpier/torrentpier/pull/1546) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Added ability to reset ratio [\#1545](https://github.com/torrentpier/torrentpier/pull/1545) ([belomaxorka](https://github.com/belomaxorka))
|
||||
|
|
|
@ -114,9 +114,9 @@ class APCu extends Common
|
|||
public function rm(string $name = null): bool
|
||||
{
|
||||
$targetMethod = is_string($name) ? 'delete' : 'flush';
|
||||
$name = is_string($name) ? ("'" . $this->prefix . $name . "'") : null;
|
||||
$name = is_string($name) ? $this->prefix . $name : null;
|
||||
|
||||
$this->cur_query = "cache->$targetMethod($name)";
|
||||
$this->cur_query = "cache->$targetMethod('$name')";
|
||||
$this->debug('start');
|
||||
|
||||
$result = $this->apcu->$targetMethod($name);
|
||||
|
|
|
@ -119,9 +119,9 @@ class File extends Common
|
|||
public function rm(string $name = null): bool
|
||||
{
|
||||
$targetMethod = is_string($name) ? 'delete' : 'flush';
|
||||
$name = is_string($name) ? ("'" . $this->prefix . $name . "'") : null;
|
||||
$name = is_string($name) ? $this->prefix . $name : null;
|
||||
|
||||
$this->cur_query = "cache->$targetMethod($name)";
|
||||
$this->cur_query = "cache->$targetMethod('$name')";
|
||||
$this->debug('start');
|
||||
|
||||
$result = $this->file->$targetMethod($name);
|
||||
|
|
|
@ -174,9 +174,9 @@ class Memcached extends Common
|
|||
}
|
||||
|
||||
$targetMethod = is_string($name) ? 'delete' : 'flush';
|
||||
$name = is_string($name) ? ("'" . $this->prefix . $name . "'") : null;
|
||||
$name = is_string($name) ? $this->prefix . $name : null;
|
||||
|
||||
$this->cur_query = "cache->$targetMethod($name)";
|
||||
$this->cur_query = "cache->$targetMethod('$name')";
|
||||
$this->debug('start');
|
||||
|
||||
$result = $this->memcached->$targetMethod($name);
|
||||
|
|
|
@ -176,9 +176,9 @@ class Redis extends Common
|
|||
}
|
||||
|
||||
$targetMethod = is_string($name) ? 'delete' : 'flush';
|
||||
$name = is_string($name) ? ("'" . $this->prefix . $name . "'") : null;
|
||||
$name = is_string($name) ? $this->prefix . $name : null;
|
||||
|
||||
$this->cur_query = "cache->$targetMethod($name)";
|
||||
$this->cur_query = "cache->$targetMethod('$name')";
|
||||
$this->debug('start');
|
||||
|
||||
$result = $this->redis->$targetMethod($name);
|
||||
|
|
|
@ -117,9 +117,9 @@ class Sqlite extends Common
|
|||
public function rm(string $name = null): bool
|
||||
{
|
||||
$targetMethod = is_string($name) ? 'delete' : 'flush';
|
||||
$name = is_string($name) ? ("'" . $this->prefix . $name . "'") : null;
|
||||
$name = is_string($name) ? $this->prefix . $name : null;
|
||||
|
||||
$this->cur_query = "cache->$targetMethod($name)";
|
||||
$this->cur_query = "cache->$targetMethod('$name')";
|
||||
$this->debug('start');
|
||||
|
||||
$result = $this->sqlite->$targetMethod($name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue