The $templateCache is completely separate from the browser caching.
Browser Cache: Caches files such as myapp.js and fancy.css so your browser does not have to fetch the files from the server if it has a recently cached copy
$templateCache: is the way angularjs stores and tracks snippets of html that are used for different angular components/modules after they first time they are loaded (although you can choose to load the $templateCache directly). The $templateCache is rebuilt every time you reload the app, it is not persistent across the browser.
The reason angular does this is because you might reuse the same html file for multiple templates (or it may appear multiple times on your site, such as when using directives). This allows angular to know it already has that snippet and can load it from the cache.
Answers to a couple questions
How do these two caches interact with HTTP requests?
You can't cache $.ajax or $http requests, but this would only affect fetching static content such as javascript files, css files and images. The advantage of the browser cache is that it would improve user experience/performance. If they were just on your site yesterday they do not have to wait to pull down all the associated static content.
The angularjs $templateCache does not interact with http at all. While the resource may come from an http fetch, and your browser may cache that file. Angular is choosing to organize and track those snippets of html.
To better examplify this look at a this snippet:
angular.module('directivesModule').directive('mySharedScope', function () {
return {
template: 'Name: {{customer.name}}<br /> Street: {{customer.street}}'
};
});
The template in the above module would still have its' html added to the angular $templateCache even though the html is inline in the directive definition.
What are the drawbacks of using caches in general (either for caching files or response from HTTP requests)
You do have to be careful when updated versions of your static content. You can get around this through a variety of types of cache busting.
example:
You update your myapp.js, the was 1.1 now it is 1.2 The users browser would not now that and they would load the old version of the site.
To get around this you can change the name. This will force the users browser to fetch the most recent file.
ex. myapp_1.1.js to myapp_1.2.js
Again the angularjs $templateCache is not affected by this because it is not persistent.