Hi Frank,
It should look something like this: @CacheGroups({ "g1", "g2 "})
Andrus
> On Feb 9, 2016, at 8:56 PM, Frank Herrmann
> wrote:
>
> Hi Andrus,
>
> One last question on the @CacheGroups annotation. I'm assuming that the
> annotation can be used to flush more than one cache group, if n
Hi Andrus,
One last question on the @CacheGroups annotation. I'm assuming that the
annotation can be used to flush more than one cache group, if necessary.
What is the proper syntax to use? For instance would it be:
@CacheGroups("group1", "group2") ? Or something similar?
-Frank
On Thu, Feb 4, 2
Thanks for the feedback. I think I prefer to keep everything in the module,
so I'll try the first solution.
-Frank
On Thu, Feb 4, 2016 at 2:16 PM, Andrus Adamchik
wrote:
> Ah, you are running into an earlier DI limitation. All DI collection item
> *types* needed to be bound explicitly in DI bef
Ah, you are running into an earlier DI limitation. All DI collection item
*types* needed to be bound explicitly in DI before you can add them to
collections. E.g.:
// this looks a bit ugly, but ensures that CacheInvalidationFilter singleton
// can be referenced as collection/map element
b
Hi Andrus,
Following the documentation, I tried to add the following to the DI Module:
public class M2CayenneModule implements Module{
> @Override
> public void configure(Binder binder) {
> binder.bind(DataDomain.class).toProvider(M2DataDomainProvider.class);
> binder.bind(QueryCache.class).to(M2
Thanks again for all the help.
-Frank
On Thu, Feb 4, 2016 at 2:22 AM, Andrus Adamchik
wrote:
>
>
>
> > On Feb 4, 2016, at 9:33 AM, Andrus Adamchik
> wrote:
> >
> > (Hmm, why don't I copy the above to our docs :))
>
> Here it is for 4.0:
>
>
> https://github.com/apache/cayenne/commit/5d3e141a96
> On Feb 4, 2016, at 9:33 AM, Andrus Adamchik wrote:
>
> (Hmm, why don't I copy the above to our docs :))
Here it is for 4.0:
https://github.com/apache/cayenne/commit/5d3e141a9635dc28ce358d048840e74b76b2b0fd
We'll publish it on the site in a few days hopefully..
Andrus
> I think I'm beginning to understand. The annotation, along with the
> CacheInvalidationFilter, is to flush a particular cache group when changes
> are committed to the annotated object.
Yes, exactly.
> Is there some documentation for 3.1 or 4.0 for these annotations and query
> caching? The la
I think I'm beginning to understand. The annotation, along with the
CacheInvalidationFilter, is to flush a particular cache group when changes
are committed to the annotated object.
Is there some documentation for 3.1 or 4.0 for these annotations and query
caching? The latest I can find is the 3.0
Is the annotation used for the Object Cache then and not the Query Cache?
On Wed, Feb 3, 2016 at 3:10 PM, Frank Herrmann <
frank.herrm...@modernizingmedicine.com> wrote:
> So, is the CacheGroups annotation used by the query cache at all? If I
> have to set the cache group via code, then what purp
So, is the CacheGroups annotation used by the query cache at all? If I have
to set the cache group via code, then what purpose does the annotation
serve?
Thanks for the clarification.
-Frank
On Wed, Feb 3, 2016 at 3:08 PM, Andrus Adamchik
wrote:
> Ah, I think this is relevant:
>
> > If I s
Ah, I think this is relevant:
> If I specify the cache group in the code, i.e.
> query.setCacheGroups(), everything works fine, and the cache group is
> utilized.
This is needed. This is how Cayenne knows which cache group a query is
associated with.
Andrus
> On Feb 3, 2016, at
Sure. It takes a few hops to get there but here it is.
The actual search is done in our CayenneGenericDao class. The type
parameter in this method is the StatusFirm class.
public List find(Class type, SearchContext searchContext)
> {
> DataContext dataContext = getObjectContext();
> if (FlushMod
Do you have an example of SelectQuery fetching StatusFirms?
Andrus
> On Feb 3, 2016, at 10:12 PM, Frank Herrmann
> wrote:
>
> Hi Andrus,
>
> Thanks for the quick reply. However, adding the filter didn't seem to work.
> Below is my addition of the filter to our runtime.
>
> public synchronize
Hi Andrus,
Thanks for the quick reply. However, adding the filter didn't seem to work.
Below is my addition of the filter to our runtime.
public synchronized static void initialize(String cayenneConfig)
> {
> if(cayenneRuntime != null) {
> return;
> }
>
> if(logger.isInfoEnabled()) {
> logger.inf
Hi Frank,
For the annotation to get processed, you will need to add
CacheInvalidationFilter to your ServerRuntime. Here is an example:
https://github.com/andrus/wowodc13/blob/94ac0f4920a5f494c4e73de717c05e5a54302921/editor/src/main/java/demo/editor/services/cayenne/EditorCayenneService.java
Hop
Hello All,
I was wondering if there is anything special I might be missing to utilize
the @CacheGroups annotation for query caching. I have successfully gotten
Cayenne to use Ehcache for query caching. I have cache groups specified in
the ehcache.xml file. However, if I use the @CacheGroups annota
17 matches
Mail list logo