Does Teamcity caches REST responses ?
HI,
My team and I, think that we need to implement a cache system of our REST requests to teamcity as we are facing charge issues on the server. So before investing in that, we would like to know if teamcity has already a cache somewhere of REST requests it receives.
Another question far from the cache system; does requesting the server for unnecessary fields impacts in any way server performances ?
exemple: asking for all fields of all buildTypes under a given project, and only need properties: localhost:8111/rest/api/buildTypes?locator=affectedProject:MyProject&fields=buildType(id,name,href,template,properties(property),vcsRootEntries(vcs-root-entry(id,name...),artifactDependencies...)
PS : i know i can ask only for fields i need, but i am asking out of curiosity.
Thank you.
Please sign in to leave a comment.
Hello,
REST does not use any kind of caching, but there can be some caching on the TeamCity core API level.
However, it is generally a good idea to structure REST API calls so that no duplicate information is repeatedly retrieved.
It might make sense to look into the origin goal you have, the requests you perform and server issues you experience. If you get performance impact on the server, feel free to file an issue into the tracker noting the requests you send and taking a set of the thread dumps on the server during the slow request execution.
As to the requested fields: omitting a field can save time (and response size, obviously). This depends on the request and specific fields though.