class ElementResource {

    @GET
    public Response getElement() throws NotFoundException {
        LOG.debug("GET element {}", element);
        net.sf.ehcache.Cache ehcache = lookupCache();
        net.sf.ehcache.Element ehcacheElement = lookupElement(ehcache);

        Element localElement = new Element(ehcacheElement, uriInfo.getAbsolutePath().toString());

        Date lastModifiedDate = createLastModified(ehcacheElement);
        EntityTag entityTag = createETag(ehcacheElement);


//        Response.ResponseBuilder responseBuilder = request.evaluatePreconditions(lastModifiedDate);
        Response.ResponseBuilder responseBuilder = request.evaluatePreconditions(lastModifiedDate, entityTag);
        //returns 304 if preconditions are met
        if (responseBuilder != null) {
            return responseBuilder.build();
        } else {
            //return the data?
            return Response.ok(localElement.getValue(), localElement.getMimeType())
                    .lastModified(lastModifiedDate)
                    .tag(entityTag)
                    .header("Expires", (new Date(localElement.getExpirationDate())).toString())
                    .build();
        }
    }

    public  ElementResource(UriInfo uriInfo, Request request,
                           String cache, String element);

}