tsgrp / OpenContent

TSG's Web Services for ECM Repositories
8 stars 4 forks source link

Config Service Cache Needs Proper Cache Control #32

Open mbowen000 opened 10 years ago

mbowen000 commented 10 years ago

When configs are modified the user's cached configs will most likely continue to be used unless their cache is cleared. This could cause problems if an admin deploys model updates and expects the data dictionary to be refreshed because a user will have out of date configs. This relates to issue https://github.com/tsgrp/hpi/issues/310 and would most likely solve this issue.

Solution is to implement proper "Last-Modified" to be set on OC Config Service REST responses to that the browser knows when configs are "stale." 305 Not Modified would be returned so the client would use what is in the cache unless the modified date was newer than "If-Modified-Since" that is stored on the requests. See RESTContent for an example of this being done - its pretty much exactly the same.