- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xo::db::CrCache::Class
::xo::db::CrCache::Class create ...
Class Relations
::xotcl::Class create ::xo::db::CrCache::Class \ -superclass ::xotcl::ObjectMethods (to be applied on instances)
lookup (scripted)
# # We need here the strange logic to avoid caching of lookup fails # (when lookup returns 0). Adding cache-fails to the shared cache # would lead to a high number of cache entries. Therefore, we add # these to a per-request cache and (i.e. flush) these in sync with # the xo::xotcl_object_type_cache. The avoids a high number of # cache queries (and cache locks), since these lookups are # performed often many times per request. # if {[acs::per_request_cache get -key xotcl-core.lookup-$parent_id-$name value]} { return $value } while {1} { set item_id [xo::xotcl_object_type_cache eval -partition_key $parent_id $parent_id-$name { set item_id [next] if {$item_id == 0} { # # Not found, perform per-thread caching. This has to be # invalidated like the xotcl_object_type_cache. # acs::per_request_cache eval -key xotcl-core.lookup-$parent_id-$name {set key 0} #ns_log notice ".... lookup $parent_id-$name => 0 -> break and don't cache" break } return $item_id }] break } # :msg "lookup $parent_id-$name -> item_id=$item_id" return $item_id
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables