private static boolean needsToBeSynced(Map<String, Instant> lastSynced, Field field) {
        Objects.requireNonNull(field);
        long cacheDurationMillis = field.getAnnotation(PlcTag.class).cacheDurationMillis();
        if (cacheDurationMillis < 0) {
            return true;
        }
        String fqn = getFqn(field);
        if (lastSynced.containsKey(fqn)) {
            Instant last = lastSynced.get(fqn);
            return Instant.now().minus(cacheDurationMillis, ChronoUnit.MILLIS).isAfter(last);
        }
        return true;
    }
Checks if a tags needs to be re-fetched/re-written, i.e., the cached values are too old.
plc4j/tools/opm/src/main/java/org/apache/plc4x/java/opm/PlcEntityInterceptor.java