Code Duplication    Length = 9-11 lines in 3 locations

eZ/Publish/Core/Persistence/Cache/LocationHandler.php 1 location

@@ 232-242 (lines=11) @@
229
    /**
230
     * {@inheritdoc}
231
     */
232
    public function create(CreateStruct $locationStruct)
233
    {
234
        $this->logger->logCall(__METHOD__, array('struct' => $locationStruct));
235
        $location = $this->persistenceHandler->locationHandler()->create($locationStruct);
236
237
        // need to clear loadLocationsByContent and similar collections involving locations data
238
        // also need to clear content info on main location changes
239
        $this->cache->invalidateTags(['content-' . $locationStruct->contentId, 'role-assignment-group-list-' . $locationStruct->contentId]);
240
241
        return $location;
242
    }
243
244
    /**
245
     * {@inheritdoc}

eZ/Publish/Core/Persistence/Cache/UserHandler.php 2 locations

@@ 127-136 (lines=10) @@
124
    /**
125
     * {@inheritdoc}
126
     */
127
    public function update(User $user)
128
    {
129
        $this->logger->logCall(__METHOD__, array('struct' => $user));
130
        $return = $this->persistenceHandler->userHandler()->update($user);
131
132
        // Clear corresponding content cache as update of the User changes it's external data
133
        $this->cache->invalidateTags(['content-fields-' . $user->id, 'user-' . $user->id]);
134
135
        return $return;
136
    }
137
138
    /**
139
     * {@inheritdoc}
@@ 422-430 (lines=9) @@
419
    /**
420
     * {@inheritdoc}
421
     */
422
    public function updatePolicy(Policy $policy)
423
    {
424
        $this->logger->logCall(__METHOD__, array('struct' => $policy));
425
        $return = $this->persistenceHandler->userHandler()->updatePolicy($policy);
426
427
        $this->cache->invalidateTags(['policy-' . $policy->id, 'role-' . $policy->roleId]);
428
429
        return $return;
430
    }
431
432
    /**
433
     * {@inheritdoc}