Example - Real Cache
Unfortunately, a real cache is generally more complicated, requiring the ns_cond command as well:
set lock [nsv_get cache lock]; set cond [nsv_get cache cond]
if ![nsv_exists cache $key] {
set value [… fetch data for $key …]
nsv_set cache $key $value
while {[set value [nsv_get cache $key]] == “”} {