try {
Period maxage = Period.inSeconds(Long.parseLong(content));
cachingDirectives.setMaxAge(maxage,
ResponseCachingDirectives.PRIORITY_HIGH);
cachingDirectives.enable();
} catch (NumberFormatException e) {
// If string didn't parse to long property, throw an exception
// reusing existing localised message, saying that Period was
// expected, but String was encountered.
throw new PAPIException(EXCEPTION_LOCALIZER.format(