Class IpRangeCache
java.lang.Object
io.goobi.viewer.model.security.user.IpRangeCache
Application-scoped cache for IpRange reads. See
docs/superpowers/specs/2026-04-22-dao-access-cache-design.md.
Thread-safety and invalidation contract match io.goobi.viewer.model.security.LicenseTypeCache.
Staleness note on IpRange.licenses: the hydrated licenses collection on each cached
IpRange can become stale after addLicense / updateLicense / deleteLicense
writes (those writes do not invalidate this cache, because the relevant access-decision code paths
go through the DAO for getLicenses(...) directly). Do not rely on
cachedIpRange.getLicenses() for authorisation decisions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns allIpRanges as an immutable list.voidDrops the current snapshot.
-
Constructor Details
-
IpRangeCache
public IpRangeCache()
-
-
Method Details
-
getAllIpRanges
Returns allIpRanges as an immutable list.- Returns:
- immutable list of IP ranges; never null
- Throws:
DAOException- if the underlying DAO load fails
-
invalidate
public void invalidate()Drops the current snapshot. The next read reloads from the DAO. Called byJPADAOwrite methods after a successful commit.
-