openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Chicchiriccò <>
Subject Proper way to use query cache
Date Mon, 23 Jan 2012 12:56:35 GMT
Hi all,
I was used (in Hibernate) to enable query cache on a per-query base by
mean of query hints like as follows:

        Query query = entityManager.createQuery("SELECT e FROM "
                + SchemaMapping.class.getSimpleName() + " e");

        return query.getResultList();

Even though I've found this approach not for hibernate only (see [1],
[2] and [3] for example), I've understood that OpenJPA does not support
it (yet?).

Now my question is: provided that I've set



                <property name="openjpa.DataCache" value="true" />
                <property name="openjpa.QueryCache" value="true" />

in my persistence unit,
how can I activate query cache for a certain query?




Francesco Chicchiriccò

Apache Cocoon Committer and PMC Member

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message