While testing another issue, I encountered a bug with the QuerySQLCache. If you execute JPQL that has query pagination, we recognize that and exclude the query from the cache. If you execute the query once without pagination, then execute it again with pagination we will 'forget' about the pagination and return the entire result set. I'll attach a JUnit showing the issue.
 1864 test WARN [main] openjpa.Runtime - Query "select e from simple e WHERE e.name=:name order by e.value" is removed from cache excluded permanently. The following query is not cached because the query uses pagination: select e from simple e WHERE e.name=:name order by e.value.