code: private void updateContextDates(CmsDbContext dbc, CmsResource resource) {
  
          CmsFlexRequestContextInfo info = dbc.getFlexRequestContextInfo();
          if (info != null) {
              info.updateFromResource(resource);
          }
      }
docs: Updates the current users context dates with the given resource.<p>
  
  This checks the date information of the resource based on
  {@link CmsResource#getDateLastModified()} as well as
  {@link CmsResource#getDateReleased()} and {@link CmsResource#getDateExpired()}.
  The current users request context is updated with the the "latest" dates found.<p>
  
  This is required in order to ensure proper setting of <code>"last-modified"</code> http headers
  and also for expiration of cached elements in the Flex cache.
  Consider the following use case: Page A is generated from resources x, y and z.
  If either x, y or z has an expiration / release date set, then page A must expire at a certain point
  in time. This is ensured by the context date check here.<p>
  
  @param dbc the current database context
  @param resource the resource to get the date information from