Issue Type: Task Task
Assignee: Unassigned
Created: 13/Aug/14 11:59 AM
Description:

With MGNLCACHE-55, one can cache arbitrary objects (that was already the case, but the API was awkward, and the cache could not be configured), but one still has to :

public class FooBar {
  private final Cache cache;
  @Inject
  public FooBar(CacheModule cacheModule) {
    // or keep a ref to module and retrieve the cache when needed
    this.cache = cacheModule.getCacheFactory().getCache("foo-cache");
  }
}

It'd be nice if one could do this instead:

public class FooBar {
  private final Cache cache;
  @Inject
  public FooBar(@Named("foo-cache") Cache cache) {
    this.cache = cache;
  }
}

Another approach (or additional) would let one inject an unnamed Cache, and the name would, by convention, be the class name of the injectee.

Fix Versions: 5.3
Project: Magnolia Cache Module
Priority: Neutral Neutral
Reporter: Grégory Joseph
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <dev-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to