title: Queries vs Filters - Order of execution
body: <p>I've read <a href="https://stackoverflow.com/questions/14595988/queries-vs-filters">this question</a> and a colleague of mine made me doubt:</p>
  
  <p>In a filtered query, when is the filter applied ? Before or after executing the query ? When is the result cached ?</p>
  
  <p>If the filter is applied beforehand, wouldn't it be a a good thing to duplicate the query part in the filters ?
  If the filter is applied afterward, then i'm having trouble understanding what is cached.</p>