Cache - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Procedures and Functions : Cache Package : Cache/RemoveTemporary

Cache

  

RemoveTemporary

  

remove a temporary entry from the cache table

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

RemoveTemporary( cache, key )

Parameters

cache

-

cache table or procedure: the object the entry is removed from

key

-

list: the key to remove

Description

• 

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.

Examples

c1Cache

c1:=Cache512

(1)

Cache:-AddTemporaryc1,x,y

Cache:-AddTemporaryc1,y,z

evalc1

Cache512,'temporary'=x=y,y=z

(2)

Cache:-RemoveTemporaryc1,x

evalc1

Cache512,'temporary'=y=z

(3)

Cache:-RemoveTemporaryc1,y

evalc1

Cache512

(4)

p := proc(x,y) option cache; x+y; end proc;

p:=procx,yoptioncache;x+yend proc

(5)

p1,1

2

(6)

Cache:-AddTemporaryp,2,2,8

Cache:-AddTemporaryp,1,2,5

p2,2

8

(7)

Cache:-RemoveTemporaryp,2,2

p2,2

4

(8)

op4,evalp

Cache512,'temporary'=2,2=4,1,2=5,1,1=2

(9)

p1,2

5

(10)

Cache:-RemoveTemporaryp,1,2

p1,2

3

(11)

op4,evalp

Cache512,'temporary'=2,2=4,1,2=3,1,1=2

(12)

See Also

Cache

Cache Package

Cache[AddPermanent]

Cache[AddTemporary]

Cache[PermanentEntries]

Cache[PermanentIndices]

Cache[RemovePermanent]

Cache[Resize]

Cache[TemporaryEntries]

Cache[TemporaryIndices]

option cache

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam