Documentation
¶
Overview ¶
Package cache provides for caching facts that were infered during a query and pottentially reusing them for subsequent operations with the same query.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FactCache ¶
type FactCache interface { // AddFact offers the cache a chance to remember this fact, if it does choose to remember // it, it should make a copy AddFact(f *rpc.Fact) // AddInferedFact offers the cache a change to remember this inferred fact, along with // the actual path that was used for the inference AddInferedFact(f *rpc.Fact, inferencePath []rpc.Fact) // AddFiction offers the cache a chance to remember that the fact <s><p><o> definitely // does not exist at the indicated index. AddFiction(index uint64, subject, predicate uint64, obj rpc.KGObject) // Fact checks to see if there's a fact in the cache with the SPO, and that is known // to exist at the index Fact(index uint64, subject, predicate uint64, obj rpc.KGObject) (fact *rpc.Fact, inferencePath []rpc.Fact) // IsFiction returns true if we know that the fact <s><p><o> does not exist at the // log index IsFiction(index uint64, subject, predicate uint64, obj rpc.KGObject) bool }
FactCache allows for code to find and cache facts (most typically inferred facts) to reduce the number of parts of the query that need to be fully executed against the views