Macaulay2 » Documentation
Packages » DGAlgebras » Accessors and cache management » invalidateDGAlgebraCache
next | previous | forward | backward | up | index | toc

invalidateDGAlgebraCache -- Discard cached derived data so that it is recomputed from scratch

Description

invalidateDGAlgebraCache wipes every cache entry that records a value derived from the differential: per-degree differential matrices, per-degree homology, the homology algebra, and any Complex or block-diff summary cached by dgComplex or displayBlockDiff. The cache sub-tables themselves are recreated empty, so subsequent lookups recompute the values rather than returning stale results. Routines that mutate the differential (most notably setDiff) call this function internally.

i1 : R = QQ[x, y] / ideal(x^2, y^2)

o1 = R

o1 : QuotientRing
i2 : A = koszulComplexDGA R

o2 = {Ring => R                          }
      Underlying algebra => R[T   ..T   ]
                               1,1   1,2
      Differential => {x, y}

o2 : DGAlgebra
i3 : C1 = dgComplex A

      1      2      1
o3 = R  <-- R  <-- R
                    
     0      1      2

o3 : Complex
i4 : invalidateDGAlgebraCache A

o4 = {Ring => R                          }
      Underlying algebra => R[T   ..T   ]
                               1,1   1,2
      Differential => {x, y}

o4 : DGAlgebra
i5 : assert(not A.cache#?(symbol dgComplex))
i6 : C2 = dgComplex A

      1      2      1
o6 = R  <-- R  <-- R
                    
     0      1      2

o6 : Complex
i7 : assert(instance(C2, Complex))
i8 : KM = koszulComplexDGM R^1

o8 = {Base ring => R                    }
      DG algebra => R[T   ..T   ]
                       1,1   1,2
                                       1
      Natural module => (R[T   ..T   ])
                            1,1   1,2
      Generator degrees => {{0, 0}}
      Differentials on gens => {0}

o8 : DGModule
i9 : D1 = dgComplex KM

      1      2      1
o9 = R  <-- R  <-- R
                    
     0      1      2

o9 : Complex
i10 : invalidateDGAlgebraCache KM

o10 = {Base ring => R                    }
       DG algebra => R[T   ..T   ]
                        1,1   1,2
                                        1
       Natural module => (R[T   ..T   ])
                             1,1   1,2
       Generator degrees => {{0, 0}}
       Differentials on gens => {0}

o10 : DGModule
i11 : assert(not KM.cache#?(symbol dgComplex))
i12 : D2 = dgComplex KM

       1      2      1
o12 = R  <-- R  <-- R
                     
      0      1      2

o12 : Complex
i13 : assert(instance(D2, Complex))

See also

Ways to use invalidateDGAlgebraCache:

  • invalidateDGAlgebraCache(DGAlgebra)
  • invalidateDGAlgebraCache(DGModule)

For the programmer

The object invalidateDGAlgebraCache is a method function.


The source of this document is in /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/DGAlgebras/doc.m2:7509:0.