I installed WP Super Cache. It works fine except for one case.
I looked into the code of SuperCache and found out that it examines wp pages and looks for certain tags. If it finds them, it creates their cache version. So I added
to workaround this (but I honestly hate this solution), and it started generating cached versions when the url was accessed from the browser, but not from jQuery.ajax() :/