Cache
RemoveTemporary
remove a temporary entry from the cache table
Calling Sequence
Parameters
Description
Examples
RemoveTemporary( cache, key )
cache
-
cache table or procedure: the object the entry is removed from
key
list: the key to remove
The RemoveTemporary command removes the temporary entry for which key is the key. The cache table can be given directly as cache, or cache can refer to a procedure that has, or can have, a cache remember table. If such a procedure is given and it has a cache remember table, the temporary entry is removed from that table. If the procedure does not have a table no action is taken.
To handle an expression sequence as a key, key must be given in a list. The actual key used for the entry is op(key).
To add a temporary entry to a cache table, use AddTemporary.
For more information on cache tables, see Cache Package.
c1≔Cache⁡
c1≔Cache⁡512
Cache:-AddTemporary⁡c1,x,y
Cache:-AddTemporary⁡c1,y,z
eval⁡c1
Cache⁡512,temporary=y=z,x=y
Cache:-RemoveTemporary⁡c1,x
Cache⁡512,temporary=y=z
Cache:-RemoveTemporary⁡c1,y
Cache⁡512
p := proc(x,y) option cache; x+y; end proc;
p ≔ procx,yoptioncache;x+yend proc
p⁡1,1
2
Cache:-AddTemporary⁡p,2,2,8
Cache:-AddTemporary⁡p,1,2,5
p⁡2,2
8
Cache:-RemoveTemporary⁡p,2,2
4
op⁡4,eval⁡p
Cache⁡512,temporary=2,2=4,1,1=2,1,2=5
p⁡1,2
5
Cache:-RemoveTemporary⁡p,1,2
3
Cache⁡512,temporary=2,2=4,1,1=2,1,2=3
See Also
Cache Package
Cache[AddPermanent]
Cache[AddTemporary]
Cache[PermanentEntries]
Cache[PermanentIndices]
Cache[RemovePermanent]
Cache[Resize]
Cache[TemporaryEntries]
Cache[TemporaryIndices]
option cache
Download Help Document