On the tutorial page https://developer.atlassian.com/x/lAAf the new version 2 is used as the example. I'm interested in using the api in a plugin with support for earlier versions of confluence as well. E.g. I’d like to use the api on confluence 5.0 as well as on 5.5, but I can’t seem to bundle the latest version of the cache api in my pom on 5.0 as it results in a classdefException (not finding CacheLoader)
Any pointers appreciated.
Edit: After some thought I guess what I really want is to specify to always bundle a certain dependency (in this case atlassian-cache-api) of a certain version (2.3.4) and always use that even if confluence bundles another version of the plugin.
/Denns
Community moderators have prevented the ability to post new answers.
I ended up using the bundled cache api, only using methods and classes available from the early 0.1 version. This way I can use the cache api across all my desired Confluence versions. Since the new API is backwards compatible with 0.1 this works well, even if I’m missing out on the newer functionality.
Hi Dennis,
I dont think we need to do any pom modification to use the cache API. I tried to use it right out of the box for my plugins for v5.3.4 as well as 5.5, and didnt find any issues. For version 5.0 , I guess you can test if you are able to use com.atlassian.cache.Cache and com.atlassian.cache.CacheManager, in your plugin code. If not, then either they are using a diffent java class to do caching or maybe they dont provide the api for it in 5.0.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.