Skip to content

Commit

Permalink
Add the Resource Type to the cache tags
Browse files Browse the repository at this point in the history
  • Loading branch information
cundd committed May 27, 2019
1 parent aa1404e commit c17a736
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ private function clearCache(RestRequestInterface $request)
private function getTags(RestRequestInterface $request)
{
$currentPath = $request->getPath();
list($vendor, $extension, $model) = Utility::getClassNamePartsForResourceType($request->getResourceType());
$resourceType = $request->getResourceType();
list($vendor, $extension, $model) = Utility::getClassNamePartsForResourceType($resourceType);

return array_filter(
array_map(
Expand All @@ -257,6 +258,7 @@ function ($tag) {
$vendor . '_' . $extension . '_' . $model,
$extension . '_' . $model,
$currentPath,
(string)$resourceType,
]
)
);
Expand Down

0 comments on commit c17a736

Please sign in to comment.