- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class Relations
::nx::Object create ::ns_cache
Methods (to be applied on the object)
create (scripted, public)
ns_cache create [ -size size ] [ -timeout timeout ] cache_name
expire in NS means timeout in AOLserver
- Switches:
- -size (optional, defaults to
"1024000"
) - -timeout (optional)
- -size (optional, defaults to
- Parameters:
- cache_name (required)
- Testcases:
- No testcase defined.
# expire in NS means timeout in AOLserver if {[info exists timeout]} { set create_cmd "ns_cache_create -expires $timeout $cache_name $size" } else { set create_cmd "ns_cache_create $cache_name $size" } return [{*}$create_cmd]
eval (scripted, public)
ns_cache eval cache_name key script
- Parameters:
- cache_name (required)
- key (required)
- script (required)
- Testcases:
- No testcase defined.
set rc [catch {uplevel [list ns_cache_eval $cache_name $key $script]} result] return -code $rc $result
flush (alias)
get (scripted, public)
ns_cache get cache_name key var_name
- Parameters:
- cache_name (required)
- key (required)
- var_name (required)
- Testcases:
- No testcase defined.
if {[info exists var_name]} { return [uplevel [list ns_cache_get $cache_name $key $var_name]] } else { return [ns_cache_get $cache_name $key] }
names (scripted, public)
ns_cache names cache_name args [ args... ]
- Parameters:
- cache_name (required)
- args (required)
- Testcases:
- No testcase defined.
set ts0 [clock clicks -milliseconds] set r [ns_cache_keys $cache_name {*}$args] set span [expr {[clock clicks -milliseconds] - $ts0}] if {$span > 100} { ad_log notice "!!!! long ns_cache_names $span ms, ns_cache names $cache_name $args" } return $r
set (scripted, public)
ns_cache set cache_name key value
- Parameters:
- cache_name (required)
- key (required)
- value (required)
- Testcases:
- No testcase defined.
uplevel ns_cache_eval -force -- $cache_name [list $key] [list set _ $value]
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables