cwbit/cakephp-aggregate-cache — pull request #8 by Indemnity83 (2014-10-01 02:49:43+00:00)
Title: Handle foreignId changes, updateCache on both old and new

On update of a model, if the foreignId changed (IE, comment moved to different post) the aggregateCache would be updated on the new foreign model, but the cache would remain untouched on the old model, leaving the cache out of sync. This update looks for changes in the foreignId and if detected calls __updateCache on both old and new models, keeping everything in sync.