.TH "doc_decisions_internal_cache_md" 3elektra "Sun May 29 2016" "Version 0.8.14" "Elektra" \" -*- nroff -*- .ad l .nh .SH NAME doc_decisions_internal_cache_md \- Internal KeySet Cache .SS "Issue" .PP When doing \fBkdbGet()\fP possible more keys are returned which might be confusing\&. When doing a second \fBkdbGet()\fP with a new keyset no keys might be returned, because it is up-to-date\&. .PP When doing \fBkdbSet()\fP a deep duplication is needed\&. .PP Idea: keep a duplicated keyset internally\&. Return (non-deep?) duplications exactly of the parts as requested\&. .PP .SS "Constraints" .PP .SS "Assumptions" .PP .SS "Considered Alternatives" .PP .IP "\(bu" 2 no cache (current situation) .IP "\(bu" 2 flat cache with COW .IP "\(bu" 2 deep duplicated cache .PP .PP .SS "Decision" .PP .SS "Argument" .PP .SS "Implications" .PP .SS "Related decisions" .PP .SS "Notes" .PP internal caches lead to duplication of memory consumption (could be avoided by reference counting) .PP in some cases caches cannot be avoided? -> filesys, databases? .PP cache discussion: .IP "\(bu" 2 not more keys than needed .IP "\(bu" 2 kdbGet avoids IO even if done somewhere else .IP "\(bu" 2 KDB handles could be more locally .IP "\(bu" 2 not possible to access cache with current architecture, KDB high level API .IP "\(bu" 2 implementation overhead .IP "\(bu" 2 where should the caches be .PP