- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xo::db::CrCache
::xo::db::CrCache create ...
Class Relations
::xotcl::Class create ::xo::db::CrCache \ -superclass ::xotcl::ObjectMethods (to be applied on instances)
delete (scripted)
next ::xo::xotcl_object_cache flush $item_id # we should probably flush as well cached revisionsfetch_object (scripted)
set serialized_object [::xo::xotcl_object_cache eval [string trimleft $object :] { # :log "--CACHE true fetch [self args], call shadowed method [self next]" set loaded_from_db 1 # Call the shadowed method with initializing turned off. We # want to store object before the after-load initialize in the # cache to save storage. set o [next -item_id $item_id -revision_id $revision_id -object $object -initialize 0] return [::Serializer deepSerialize $o] }] # :log "--CACHE: [self args], created [info exists created] o [info exists o]" if {[info exists loaded_from_db]} { # The basic fetch_object method creates the object, we have # just to run the after load init (if wanted) if {$initialize} { $object initialize_loaded_object } } else { # The variable serialized_object contains the serialization of # the object from the cache; check if the object exists already # or create it. if {[nsf::is object $object]} { # There would have been no need to call this method. We could # raise an error here. # :log "--!! $object exists already" } else { # Create the object from the serialization and initialize it eval $serialized_object if {$initialize} { $object initialize_loaded_object } } } $object set __cached_object 1 return $object
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables