Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » caching computation results » cache
next | previous | forward | backward | up | index | toc

# cache -- a key under which to store cache tables

## Description

    i1 : F = ZZ^3

           3
    o1 = ZZ

    o1 : ZZ-module, free

    i2 : peek F

    o2 = Module of Vector{cache => CacheTable{...2...}                     }
                          numgens => 3
                          RawFreeModule => free(rank 3 degrees = {1, 1, 1})
                          ring => ZZ

    i3 : F.cache#Foo = Bar

    o3 = Bar

    o3 : Symbol

    i4 : peek F

    o4 = Module of Vector{cache => CacheTable{...3...}                     }
                          numgens => 3
                          RawFreeModule => free(rank 3 degrees = {1, 1, 1})
                          ring => ZZ

    i5 : peek F.cache

    o5 = CacheTable{cache => MutableHashTable{}}
                    Foo => Bar
                    rank => 3

    i6 : F === ZZ^3

    o6 = true

## See also

- CacheTable -- hash tables for caching

## For the programmer

The object cache is a symbol.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/ov_caching.m2:71:0.