Cache Optimization
Because we can not perfectly trace data flow through functions, we will implement a cache which will store the most recent results from security checks. Two hashes exist, one for reading and one for writing. For the reading cache, the following data makes up the hash key.
- The parent object that is being checked.
- The property being accessed.
- The object being returned.
The result of the hash is a boolean which says either that a check is required or that it can be ommitted. The write cache is hashed on two pieces of data:
- The parent object on which the property is being set.
- The property being set.
Again, the results is a boolean which says whether a check is required.
Eviction Policy
When a property is written to, any elements that it maps to are removed from the read cache. Initially, we will not implement a limit on the size of our sets; however, if the caches become too large, we will use an LRU replacement policy.
[What else is there to talk about?]