Fix cache invalidation for modified tags (#13)
Fix cache invalidation for modified tags (#13)

* Fix cache invalidation for modified tags

The current implementation only invalidates tags using the new updated attribute values used by the tag. Older values are retained in the caches for the old values.

The fix basically tracks if the primary key attributes, or the composite tag attributes change, and uses the old value for invalidating the cache. In the case of composite keys it also invalidates caches using the new attribute values.

With the primary key the assumption is that there is no need to flush the cache for the new value, since this should be unique.

DevGroup-ru/yii2-tag-dependency-helper,free6k/yii2-tag-dependency-helper