CacheInvalidation
No edit summary
Line 20: Line 20:
* Id  
* Id  
* Class  
* Class  
* OptionalAssociationEndNameForBeingIncluded  
* MemberName  


===== Upon normal save =====
===== Upon normal save =====
new rows are inserted in MDrivenCacheInvalidationRecentlyUpdated
new rows indicating member level change are inserted in MDrivenCacheInvalidationRecentlyUpdated


Thought: If we watch the foreign keys changed - can we then reduce the work when doing invalidation?
Special treatment of newly created and deleted objects - they get the **Created and **Deleted flag


Thought: If we catch changes on attribute level - can we have the ViewModel also to report exact use of stuff and thus reduce the times we will invalidate?
For changed embedded links (single end) we also add dirty of other end


===== Upon InvalidationLoop =====
===== Upon InvalidationLoop =====
we look for direct hits on id and invalidate
we look for direct hits on id and attribute and invalidate


we look for any objects of class that has been changed recently that now should be part of the set
we look for any objects of class that has been changed recently that now should be part of the set


(ie other end of OptionalAssociationEndNameForBeingIncluded , does it point to id -> invalidate)
(ie other end of OptionalAssociationEndNameForBeingIncluded , does it point to id -> invalidate)
we look for manifest rows indicating use of allinstances and match to **Created and **Deleted and invalidate
we look for meta checksum change of viewmodel


===== Upon UpdateLoop =====
===== Upon UpdateLoop =====

Revision as of 08:17, 25 March 2019

This is work in progress and not available for production

MDrivenCacheInvalidationAdmin

  • LastInvallidationLoop
  • LastUpdateLoop

MDrivenCacheInvalidationRecentlyUpdated

  • id
  • class
  • time

MDrivenCacheManifestHead

  • ViewModel
  • RootId
  • Class
  • viewmodelMetaChecksum // set on update
  • priority // set by viewmodel property - this way information can control importance!
  • AllowOldness // set by viewmodel property - this way information can control when
  • Updated     // set on update
  • Invalidated

MDrivenCacheManifestRow

  • Id
  • Class
  • MemberName
Upon normal save

new rows indicating member level change are inserted in MDrivenCacheInvalidationRecentlyUpdated

Special treatment of newly created and deleted objects - they get the **Created and **Deleted flag

For changed embedded links (single end) we also add dirty of other end

Upon InvalidationLoop

we look for direct hits on id and attribute and invalidate

we look for any objects of class that has been changed recently that now should be part of the set

(ie other end of OptionalAssociationEndNameForBeingIncluded , does it point to id -> invalidate)

we look for manifest rows indicating use of allinstances and match to **Created and **Deleted and invalidate

we look for meta checksum change of viewmodel

Upon UpdateLoop

We look for Invalidated that has the diff between Now and Invalidated higher than allow oldness, we sort these by priority.

For each cache found we instansiate the named ViewModel with for the given root object.

We execute all actions on the ViewModel

We save all the possible changes that happened during cache - allowing us to set persisted calculated fields and create persisted derived objects.

We collect all loaded objects in the scope of the viewmodel expressions and when following links we create a manifest row stating the association. We also create a manifest row for each object found

This page was edited 34 days ago on 03/26/2024. What links here