Browse Source

remove cache from post method as contain var data

main
ghost 9 months ago
parent
commit
d3935c314d
  1. 46
      src/controller/room.php

46
src/controller/room.php

@ -347,30 +347,6 @@ class Room @@ -347,30 +347,6 @@ class Room
?int $cache = 31104000
): ?string
{
// Check for cache
$result = $this->_memory->get(
[
__METHOD__,
$data,
$field
]
);
$time = $this->_memory->get(
[
__METHOD__,
$data,
$field,
'time'
]
);
// Cache exists
if ($result && $time)
{
return $result;
}
// Skip values with meta keys
if (str_starts_with($data['key'], '_'))
{
@ -552,28 +528,6 @@ class Room @@ -552,28 +528,6 @@ class Room
)
);
// Cache results
$this->_memory->set(
[
__METHOD__,
$data,
$field
],
$result,
$cache + time()
);
$this->_memory->set(
[
__METHOD__,
$data,
$field,
'time'
],
$time,
$cache + time()
);
return $result;
}

Loading…
Cancel
Save