docs: public static Duration getExpiry(ExpiryPolicy policy, Operation op) {
        if (policy == null) {
           return getDefaultDuration();
        }
        switch (op) {
           case CREATION:
              try {
                 return policy.getExpiryForCreation();
              } catch (Throwable t) {
                 log.getExpiryHasThrown(t);
                 return getDefaultDuration();
              }
           case ACCESS:
              try {
                 return policy.getExpiryForAccess();
              } catch (Throwable t) {
                 log.getExpiryHasThrown(t);
                 // If an exception is thrown, leave expiration untouched
                 return null;
              }
           case UPDATE:
              try {
                 return policy.getExpiryForUpdate();
              } catch (Throwable t) {
                 log.getExpiryHasThrown(t);
                 // If an exception is thrown, leave expiration untouched
                 return null;
              }
           default:
              throw log.unknownExpiryOperation(op.toString());
        }
     }