Skip to content

Commit

Permalink
Fix Invalid Data Caching
Browse files Browse the repository at this point in the history
  • Loading branch information
IlicMiljan committed Mar 9, 2024
1 parent 0fe303e commit f48b018
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Reader/CachingObjectPropertiesReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ public function getPropertiesWithAttribute(object $object, string $attributeClas
$propertyArray = $this->cache->get(
$this->getCacheKey($object, $attributeClass),
function($cacheItem) use ($object, $attributeClass) {
$propertiesWithAttribute = $this->objectPropertiesReader->getPropertiesWithAttribute($object, $attributeClass);
$propertiesWithAttribute = $this->objectPropertiesReader->getPropertiesWithAttribute(
$object,
$attributeClass
);

$cacheItem->set($this->getCacheablePropertiesArray($propertiesWithAttribute));

return $propertiesWithAttribute;
return $this->getCacheablePropertiesArray($propertiesWithAttribute);
}, 3600);

return $this->loadRuntimeReflectionProperties($object, $propertyArray);
Expand Down

0 comments on commit f48b018

Please sign in to comment.