diff --git a/404.html b/404.html index fe11eb4..acdc132 100644 --- a/404.html +++ b/404.html @@ -4,13 +4,13 @@ Page Not Found | Xanthic - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/3f365dda.416c690e.js b/assets/js/3f365dda.416c690e.js new file mode 100644 index 0000000..e42fdf3 --- /dev/null +++ b/assets/js/3f365dda.416c690e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmy_website=self.webpackChunkmy_website||[]).push([[882],{1654:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>d,toc:()=>s});var o=a(7462),i=(a(7294),a(3905)),n=(a(4866),a(5162),a(4563));const r={sidebar_position:1},c="Installation",d={unversionedId:"getting-started/installation",id:"version-0.x/getting-started/installation",title:"Installation",description:"Xanthic BOM",source:"@site/versioned_docs/version-0.x/getting-started/installation.mdx",sourceDirName:"getting-started",slug:"/getting-started/installation",permalink:"/getting-started/installation",draft:!1,editUrl:"https://github.com/Xanthic/Xanthic.github.io/tree/main/docs/versioned_docs/version-0.x/getting-started/installation.mdx",tags:[],version:"0.x",lastUpdatedBy:"renovate[bot]",lastUpdatedAt:1697588099,formattedLastUpdatedAt:"Oct 18, 2023",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"version-1.x-docs",previous:{title:"Getting Started",permalink:"/category/getting-started"},next:{title:"Kotlin",permalink:"/getting-started/kotlin"}},p={},s=[{value:"Xanthic BOM",id:"xanthic-bom",level:2},{value:"Usage: For Library Developers",id:"usage-for-library-developers",level:2},{value:"Step 1: add the bom to your project:",id:"step-1-add-the-bom-to-your-project",level:3},{value:"Step 2: add the cache-core dependency:",id:"step-2-add-the-cache-core-dependency",level:3},{value:"Usage: For Application Developers",id:"usage-for-application-developers",level:2},{value:"Step 1: add the bom to your project:",id:"step-1-add-the-bom-to-your-project-1",level:3},{value:"Step 2: add a cache-implementation of your choice:",id:"step-2-add-a-cache-implementation-of-your-choice",level:3}],l={toc:s};function h(e){let{components:t,...a}=e;return(0,i.kt)("wrapper",(0,o.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"installation"},"Installation"),(0,i.kt)("h2",{id:"xanthic-bom"},"Xanthic BOM"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"cache-bom")," will ensure that all xanthic-components in your project use the same version. See our snippets below on how to include xanthic in your project."),(0,i.kt)("h2",{id:"usage-for-library-developers"},"Usage: For Library Developers"),(0,i.kt)("p",null,"You will want to include the ",(0,i.kt)("inlineCode",{parentName:"p"},"xanthic-core")," to code against this straightforward API and let users can choose whichever backing implementation they prefer!"),(0,i.kt)("h3",{id:"step-1-add-the-bom-to-your-project"},"Step 1: add the bom to your project:"),(0,i.kt)(n.JavaDependency,{group:"io.github.xanthic.cache",name:"cache-bom",version:"0.4.2",bom:"true",scope:"api",mdxType:"JavaDependency"}),(0,i.kt)("h3",{id:"step-2-add-the-cache-core-dependency"},"Step 2: add the ",(0,i.kt)("inlineCode",{parentName:"h3"},"cache-core")," dependency:"),(0,i.kt)(n.JavaDependency,{group:"io.github.xanthic.cache",name:"cache-core",scope:"api",mdxType:"JavaDependency"}),(0,i.kt)("h2",{id:"usage-for-application-developers"},"Usage: For Application Developers"),(0,i.kt)("p",null,"As user of a library that is using xanthic, you will only need to specify the ",(0,i.kt)("inlineCode",{parentName:"p"},"bom")," and pick your one or more implementations of your choice."),(0,i.kt)("h3",{id:"step-1-add-the-bom-to-your-project-1"},"Step 1: add the bom to your project:"),(0,i.kt)(n.JavaDependency,{group:"io.github.xanthic.cache",name:"cache-bom",version:"0.4.2",bom:"true",scope:"implementation",mdxType:"JavaDependency"}),(0,i.kt)("h3",{id:"step-2-add-a-cache-implementation-of-your-choice"},"Step 2: add a cache-implementation of your choice:"),(0,i.kt)("p",null,"See all supported implementations ",(0,i.kt)("a",{parentName:"p",href:"/provider/"},"here")),(0,i.kt)(n.JavaDependency,{group:"io.github.xanthic.cache",name:"cache-provider-caffeine3",scope:"implementation",mdxType:"JavaDependency"}))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3f365dda.4358e420.js b/assets/js/3f365dda.4358e420.js deleted file mode 100644 index 631ad44..0000000 --- a/assets/js/3f365dda.4358e420.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmy_website=self.webpackChunkmy_website||[]).push([[882],{1654:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>d,toc:()=>s});var o=a(7462),i=(a(7294),a(3905)),n=(a(4866),a(5162),a(4563));const r={sidebar_position:1},c="Installation",d={unversionedId:"getting-started/installation",id:"version-0.x/getting-started/installation",title:"Installation",description:"Xanthic BOM",source:"@site/versioned_docs/version-0.x/getting-started/installation.mdx",sourceDirName:"getting-started",slug:"/getting-started/installation",permalink:"/getting-started/installation",draft:!1,editUrl:"https://github.com/Xanthic/Xanthic.github.io/tree/main/docs/versioned_docs/version-0.x/getting-started/installation.mdx",tags:[],version:"0.x",lastUpdatedBy:"renovate[bot]",lastUpdatedAt:1696196037,formattedLastUpdatedAt:"Oct 1, 2023",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"version-1.x-docs",previous:{title:"Getting Started",permalink:"/category/getting-started"},next:{title:"Kotlin",permalink:"/getting-started/kotlin"}},p={},s=[{value:"Xanthic BOM",id:"xanthic-bom",level:2},{value:"Usage: For Library Developers",id:"usage-for-library-developers",level:2},{value:"Step 1: add the bom to your project:",id:"step-1-add-the-bom-to-your-project",level:3},{value:"Step 2: add the cache-core dependency:",id:"step-2-add-the-cache-core-dependency",level:3},{value:"Usage: For Application Developers",id:"usage-for-application-developers",level:2},{value:"Step 1: add the bom to your project:",id:"step-1-add-the-bom-to-your-project-1",level:3},{value:"Step 2: add a cache-implementation of your choice:",id:"step-2-add-a-cache-implementation-of-your-choice",level:3}],l={toc:s};function h(e){let{components:t,...a}=e;return(0,i.kt)("wrapper",(0,o.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"installation"},"Installation"),(0,i.kt)("h2",{id:"xanthic-bom"},"Xanthic BOM"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"cache-bom")," will ensure that all xanthic-components in your project use the same version. See our snippets below on how to include xanthic in your project."),(0,i.kt)("h2",{id:"usage-for-library-developers"},"Usage: For Library Developers"),(0,i.kt)("p",null,"You will want to include the ",(0,i.kt)("inlineCode",{parentName:"p"},"xanthic-core")," to code against this straightforward API and let users can choose whichever backing implementation they prefer!"),(0,i.kt)("h3",{id:"step-1-add-the-bom-to-your-project"},"Step 1: add the bom to your project:"),(0,i.kt)(n.JavaDependency,{group:"io.github.xanthic.cache",name:"cache-bom",version:"0.4.1",bom:"true",scope:"api",mdxType:"JavaDependency"}),(0,i.kt)("h3",{id:"step-2-add-the-cache-core-dependency"},"Step 2: add the ",(0,i.kt)("inlineCode",{parentName:"h3"},"cache-core")," dependency:"),(0,i.kt)(n.JavaDependency,{group:"io.github.xanthic.cache",name:"cache-core",scope:"api",mdxType:"JavaDependency"}),(0,i.kt)("h2",{id:"usage-for-application-developers"},"Usage: For Application Developers"),(0,i.kt)("p",null,"As user of a library that is using xanthic, you will only need to specify the ",(0,i.kt)("inlineCode",{parentName:"p"},"bom")," and pick your one or more implementations of your choice."),(0,i.kt)("h3",{id:"step-1-add-the-bom-to-your-project-1"},"Step 1: add the bom to your project:"),(0,i.kt)(n.JavaDependency,{group:"io.github.xanthic.cache",name:"cache-bom",version:"0.4.1",bom:"true",scope:"implementation",mdxType:"JavaDependency"}),(0,i.kt)("h3",{id:"step-2-add-a-cache-implementation-of-your-choice"},"Step 2: add a cache-implementation of your choice:"),(0,i.kt)("p",null,"See all supported implementations ",(0,i.kt)("a",{parentName:"p",href:"/provider/"},"here")),(0,i.kt)(n.JavaDependency,{group:"io.github.xanthic.cache",name:"cache-provider-caffeine3",scope:"implementation",mdxType:"JavaDependency"}))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.ffe1d640.js b/assets/js/runtime~main.b30acd42.js similarity index 98% rename from assets/js/runtime~main.ffe1d640.js rename to assets/js/runtime~main.b30acd42.js index 85cfc5c..91b9948 100644 --- a/assets/js/runtime~main.ffe1d640.js +++ b/assets/js/runtime~main.b30acd42.js @@ -1 +1 @@ -(()=>{"use strict";var e,t,r,a,o,n={},c={};function f(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}};return n[e].call(r.exports,r,r.exports,f),r.exports}f.m=n,e=[],f.O=(t,r,a,o)=>{if(!r){var n=1/0;for(d=0;d=o)&&Object.keys(f.O).every((e=>f.O[e](r[i])))?r.splice(i--,1):(c=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[r,a,o]},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);f.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var c=2&a&&e;"object"==typeof c&&!~t.indexOf(c);c=r(c))Object.getOwnPropertyNames(c).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,f.d(o,n),o},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((t,r)=>(f.f[r](e,t),t)),[])),f.u=e=>"assets/js/"+({42:"406803d5",125:"be6eb3e4",241:"25ba67ef",369:"a852f88c",485:"bc9815a6",514:"1be78505",523:"a50e43b1",544:"091080d6",555:"702e226c",592:"common",608:"a4e137a5",630:"7422f748",640:"af81ac3e",714:"2bb3c603",736:"96c2a821",817:"14eb3368",882:"3f365dda",918:"17896441",963:"dbc15494"}[e]||e)+"."+{42:"6e3dd4a2",125:"6146e4ce",241:"104d1d3a",369:"316c100a",485:"35a48056",514:"09127f1c",523:"948e031c",544:"c90d1516",555:"c2b4bd2b",592:"824633e7",608:"d9b6b6e3",630:"9ca86e0a",640:"ae3b4dce",714:"0fb0ebc0",736:"d470b75d",817:"aa0480ba",882:"4358e420",918:"a493ad02",963:"52b15e6a",972:"5058414f"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="my-website:",f.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var c,i;if(void 0!==r)for(var b=document.getElementsByTagName("script"),d=0;d{c.onerror=c.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),i&&document.head.appendChild(c)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/",f.gca=function(e){return e={17896441:"918","406803d5":"42",be6eb3e4:"125","25ba67ef":"241",a852f88c:"369",bc9815a6:"485","1be78505":"514",a50e43b1:"523","091080d6":"544","702e226c":"555",common:"592",a4e137a5:"608","7422f748":"630",af81ac3e:"640","2bb3c603":"714","96c2a821":"736","14eb3368":"817","3f365dda":"882",dbc15494:"963"}[e]||e,f.p+f.u(e)},(()=>{var e={303:0,532:0};f.f.j=(t,r)=>{var a=f.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var n=f.p+f.u(t),c=new Error;f.l(n,(r=>{if(f.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",c.name="ChunkLoadError",c.type=o,c.request=n,a[1](c)}}),"chunk-"+t,t)}},f.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],c=r[1],i=r[2],b=0;if(n.some((t=>0!==e[t]))){for(a in c)f.o(c,a)&&(f.m[a]=c[a]);if(i)var d=i(f)}for(t&&t(r);b{"use strict";var e,t,r,a,o,n={},c={};function f(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}};return n[e].call(r.exports,r,r.exports,f),r.exports}f.m=n,e=[],f.O=(t,r,a,o)=>{if(!r){var n=1/0;for(d=0;d=o)&&Object.keys(f.O).every((e=>f.O[e](r[i])))?r.splice(i--,1):(c=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[r,a,o]},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);f.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var c=2&a&&e;"object"==typeof c&&!~t.indexOf(c);c=r(c))Object.getOwnPropertyNames(c).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,f.d(o,n),o},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((t,r)=>(f.f[r](e,t),t)),[])),f.u=e=>"assets/js/"+({42:"406803d5",125:"be6eb3e4",241:"25ba67ef",369:"a852f88c",485:"bc9815a6",514:"1be78505",523:"a50e43b1",544:"091080d6",555:"702e226c",592:"common",608:"a4e137a5",630:"7422f748",640:"af81ac3e",714:"2bb3c603",736:"96c2a821",817:"14eb3368",882:"3f365dda",918:"17896441",963:"dbc15494"}[e]||e)+"."+{42:"6e3dd4a2",125:"6146e4ce",241:"104d1d3a",369:"316c100a",485:"35a48056",514:"09127f1c",523:"948e031c",544:"c90d1516",555:"c2b4bd2b",592:"824633e7",608:"d9b6b6e3",630:"9ca86e0a",640:"ae3b4dce",714:"0fb0ebc0",736:"d470b75d",817:"aa0480ba",882:"416c690e",918:"a493ad02",963:"52b15e6a",972:"5058414f"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="my-website:",f.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var c,i;if(void 0!==r)for(var b=document.getElementsByTagName("script"),d=0;d{c.onerror=c.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),i&&document.head.appendChild(c)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/",f.gca=function(e){return e={17896441:"918","406803d5":"42",be6eb3e4:"125","25ba67ef":"241",a852f88c:"369",bc9815a6:"485","1be78505":"514",a50e43b1:"523","091080d6":"544","702e226c":"555",common:"592",a4e137a5:"608","7422f748":"630",af81ac3e:"640","2bb3c603":"714","96c2a821":"736","14eb3368":"817","3f365dda":"882",dbc15494:"963"}[e]||e,f.p+f.u(e)},(()=>{var e={303:0,532:0};f.f.j=(t,r)=>{var a=f.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var n=f.p+f.u(t),c=new Error;f.l(n,(r=>{if(f.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",c.name="ChunkLoadError",c.type=o,c.request=n,a[1](c)}}),"chunk-"+t,t)}},f.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],c=r[1],i=r[2],b=0;if(n.some((t=>0!==e[t]))){for(a in c)f.o(c,a)&&(f.m[a]=c[a]);if(i)var d=i(f)}for(t&&t(r);b Getting Started | Xanthic - + - + \ No newline at end of file diff --git a/getting-started/installation/index.html b/getting-started/installation/index.html index 4cc0b6c..942b530 100644 --- a/getting-started/installation/index.html +++ b/getting-started/installation/index.html @@ -4,13 +4,13 @@ Installation | Xanthic - +
-

Installation

Xanthic BOM

The cache-bom will ensure that all xanthic-components in your project use the same version. See our snippets below on how to include xanthic in your project.

Usage: For Library Developers

You will want to include the xanthic-core to code against this straightforward API and let users can choose whichever backing implementation they prefer!

Step 1: add the bom to your project:

build.gradle
dependencies {
api platform('io.github.xanthic.cache:cache-bom:0.4.1')
}

Step 2: add the cache-core dependency:

build.gradle
dependencies {
api 'io.github.xanthic.cache:cache-core'
}

Usage: For Application Developers

As user of a library that is using xanthic, you will only need to specify the bom and pick your one or more implementations of your choice.

Step 1: add the bom to your project:

build.gradle
dependencies {
implementation platform('io.github.xanthic.cache:cache-bom:0.4.1')
}

Step 2: add a cache-implementation of your choice:

See all supported implementations here

build.gradle
dependencies {
implementation 'io.github.xanthic.cache:cache-provider-caffeine3'
}
- +

Installation

Xanthic BOM

The cache-bom will ensure that all xanthic-components in your project use the same version. See our snippets below on how to include xanthic in your project.

Usage: For Library Developers

You will want to include the xanthic-core to code against this straightforward API and let users can choose whichever backing implementation they prefer!

Step 1: add the bom to your project:

build.gradle
dependencies {
api platform('io.github.xanthic.cache:cache-bom:0.4.2')
}

Step 2: add the cache-core dependency:

build.gradle
dependencies {
api 'io.github.xanthic.cache:cache-core'
}

Usage: For Application Developers

As user of a library that is using xanthic, you will only need to specify the bom and pick your one or more implementations of your choice.

Step 1: add the bom to your project:

build.gradle
dependencies {
implementation platform('io.github.xanthic.cache:cache-bom:0.4.2')
}

Step 2: add a cache-implementation of your choice:

See all supported implementations here

build.gradle
dependencies {
implementation 'io.github.xanthic.cache:cache-provider-caffeine3'
}
+ \ No newline at end of file diff --git a/getting-started/kotlin/index.html b/getting-started/kotlin/index.html index 26c22ca..daa72d4 100644 --- a/getting-started/kotlin/index.html +++ b/getting-started/kotlin/index.html @@ -4,13 +4,13 @@ Kotlin | Xanthic - +

Kotlin

added in: v0.1.0

The xanthic-kotlin module provides extension functions for the CreateCache / CacheApiSpec that allows for some cleaner syntax.

Installation

build.gradle
dependencies {
implementation 'io.github.xanthic.cache:cache-kotlin'
}

createCache

added in: v0.1.0

val cache = createCache<String, Int> {
maxSize = 128
expiryType = ExpiryType.POST_ACCESS
expiryTime = Duration.ofMillis(420)
removalListener { key, value, cause ->
if (cause.isEviction) {
println("evicted: $key:$value")
}
}
}
- + \ No newline at end of file diff --git a/index.html b/index.html index 45e9ec5..462ec1e 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Xanthic - + @@ -13,7 +13,7 @@ that can hold up to 2048 elements, where entries expire 5 minutes following their latest access, and removed entries notify a specific event listener:

Cache<String, Integer> cache = CacheApi.create(spec -> {
spec.maxSize(2048L);
spec.expiryTime(Duration.ofMinutes(5L));
spec.expiryType(ExpiryType.POST_ACCESS); // or ExpiryType.POST_WRITE
spec.removalListener((key, value, cause) -> {
if (cause.isEviction()) {
// do something
}
});
});

Since CacheApiSpec#provider(CacheProvider) was not specified, the default cache provider will be used.

Default Cache Provider

  • Application developers should add at least one cache-provider-𝑥 module to their project (or create their own)
  • When there is only one cache provider registered, it will automatically become the default cache provider
  • When there are multiple cache provider modules installed, the default will be selected according to the discovery order (but it is not recommended to rely on this order)
  • Users can explicitly define which cache provider should be used as the default by calling CacheApiSettings. This will override whatever default was chosen from the discovery order
- + \ No newline at end of file diff --git a/provider/androidx/index.html b/provider/androidx/index.html index b360ea9..bfc4188 100644 --- a/provider/androidx/index.html +++ b/provider/androidx/index.html @@ -4,13 +4,13 @@ AndroidX | Xanthic - +

AndroidX

added in: v0.1.0

Description

This cache provider uses LruCache from the AndroidX library to fulfill the Xanthic Cache contract.

Due to LruCache limitations, removal listeners will observe RemovalCause.SIZE on Cache#clear calls.

Note: other Android-compatible implementations (e.g., Cache2k) may yield better performance when entry expiration is enabled.

Installation

build.gradle
dependencies {
implementation 'io.github.xanthic.cache:cache-provider-androidx'
}

Usage

Default

CacheApiSettings.getInstance().setDefaultCacheProvider(new AndroidLruProvider());

Cache<String, Integer> cache = CacheApi.create(spec -> {
// if spec.provider is not set the default cache provider will be used
});

Spec

Cache<String, Integer> cache = CacheApi.create(spec -> {
spec.provider(new AndroidLruProvider());
});
- + \ No newline at end of file diff --git a/provider/cache2k/index.html b/provider/cache2k/index.html index 8aad970..f848170 100644 --- a/provider/cache2k/index.html +++ b/provider/cache2k/index.html @@ -4,7 +4,7 @@ Cache2K | Xanthic - + @@ -12,7 +12,7 @@

Cache2K

added in: v0.1.0

Description

This provider uses the high-performance Cache2k library to fulfill the Xanthic Cache contract.

In addition, this provider can be used on Android.

However, ExpiryType.POST_ACCESS is imprecisely handled, so time-based eviction could happen early or late (but will be "correct," on average). Consider using the Caffeine provider if more precise time-based (post-access) eviction is desired.

Installation

build.gradle
dependencies {
implementation 'io.github.xanthic.cache:cache-provider-cache2k'
}

Usage

Default

CacheApiSettings.getInstance().setDefaultCacheProvider(new Cache2kProvider());

Cache<String, Integer> cache = CacheApi.create(spec -> {
// if spec.provider is not set the default cache provider will be used
});

Spec

Cache<String, Integer> cache = CacheApi.create(spec -> {
spec.provider(new Cache2kProvider());
});
- + \ No newline at end of file diff --git a/provider/caffeine/index.html b/provider/caffeine/index.html index 2af2e58..e0156b9 100644 --- a/provider/caffeine/index.html +++ b/provider/caffeine/index.html @@ -4,14 +4,14 @@ Caffeine | Xanthic - +

Caffeine

added in: v0.1.0

Description

This provider uses the high-performance Caffeine library to fulfill the Xanthic Cache contract.

This module supports Java 8, but not Android. If using Java 11+, one can switch to the Caffeine3 provider instead.

Installation

build.gradle
dependencies {
implementation 'io.github.xanthic.cache:cache-provider-caffeine'
}

Usage

Default

CacheApiSettings.getInstance().setDefaultCacheProvider(new CaffeineProvider());

Cache<String, Integer> cache = CacheApi.create(spec -> {
// if spec.provider is not set the default cache provider will be used
});

Spec

Cache<String, Integer> cache = CacheApi.create(spec -> {
spec.provider(new CaffeineProvider());
});
- + \ No newline at end of file diff --git a/provider/caffeine3/index.html b/provider/caffeine3/index.html index 1ae3686..a1b135d 100644 --- a/provider/caffeine3/index.html +++ b/provider/caffeine3/index.html @@ -4,14 +4,14 @@ Caffeine 3 | Xanthic - +

Caffeine 3

added in: v0.1.0

Description

This provider uses the high-performance Caffeine library to fulfill the Xanthic Cache contract.

This module requires Java 11 or higher (and Android is not supported). If using Java 8, one can switch to the Caffeine provider instead.

Installation

build.gradle
dependencies {
implementation 'io.github.xanthic.cache:cache-provider-caffeine3'
}

Usage

Default

CacheApiSettings.getInstance().setDefaultCacheProvider(new Caffeine3Provider());

Cache<String, Integer> cache = CacheApi.create(spec -> {
// if spec.provider is not set the default cache provider will be used
});

Spec

Cache<String, Integer> cache = CacheApi.create(spec -> {
spec.provider(new Caffeine3Provider());
});
- + \ No newline at end of file diff --git a/provider/ehcache/index.html b/provider/ehcache/index.html index 8272a5d..1a4e654 100644 --- a/provider/ehcache/index.html +++ b/provider/ehcache/index.html @@ -4,7 +4,7 @@ Ehcache 3 | Xanthic - + @@ -12,7 +12,7 @@

Ehcache 3

added in: v0.1.0

Description

This provider uses Ehcache v3 in local heap memory mode.

When using this provider, specifying ICacheSpec#maxSize is highly recommended.

Due to limitations of the Ehcache interface, additional locking is introduced to comply with the Xanthic Cache contract in a thread-safe manner. As a result, multi-threaded throughput performance will not be as great as other options.

Installation

build.gradle
dependencies {
implementation 'io.github.xanthic.cache:cache-provider-ehcache'
}

Usage

Default

CacheApiSettings.getInstance().setDefaultCacheProvider(new EhcacheProvider());

Cache<String, Integer> cache = CacheApi.create(spec -> {
// if spec.provider is not set the default cache provider will be used
});

Spec

Cache<String, Integer> cache = CacheApi.create(spec -> {
spec.provider(new EhcacheProvider());
});
- + \ No newline at end of file diff --git a/provider/expiringmap/index.html b/provider/expiringmap/index.html index caf11c5..6fbbe3b 100644 --- a/provider/expiringmap/index.html +++ b/provider/expiringmap/index.html @@ -4,13 +4,13 @@ ExpiringMap | Xanthic - +

ExpiringMap

added in: v0.1.0

Description

This provider uses Jodah ExpiringMap to fulfill the Xanthic Cache contract.

Due to Jodah limitations, removal listeners will always observe the RemovalCause.OTHER.

Consider using Caffeine or Cache2k for better performance and thread-safety.

Installation

build.gradle
dependencies {
implementation 'io.github.xanthic.cache:cache-provider-expiringmap'
}

Usage

Default

CacheApiSettings.getInstance().setDefaultCacheProvider(new ExpiringMapProvider());

Cache<String, Integer> cache = CacheApi.create(spec -> {
// if spec.provider is not set the default cache provider will be used
});

Spec

Cache<String, Integer> cache = CacheApi.create(spec -> {
spec.provider(new ExpiringMapProvider());
});
- + \ No newline at end of file diff --git a/provider/guava/index.html b/provider/guava/index.html index e591224..80b00f2 100644 --- a/provider/guava/index.html +++ b/provider/guava/index.html @@ -4,13 +4,13 @@ Guava | Xanthic - +

Guava

added in: v0.1.0

Description

This cache provider uses the popular Guava library.

For server-side users, Caffeine is recommended instead.

For Android users, Google suggests using LruCache instead.

Installation

build.gradle
dependencies {
implementation 'io.github.xanthic.cache:cache-provider-guava'
}

Usage

Default

CacheApiSettings.getInstance().setDefaultCacheProvider(new GuavaProvider());

Cache<String, Integer> cache = CacheApi.create(spec -> {
// if spec.provider is not set the default cache provider will be used
});

Spec

Cache<String, Integer> cache = CacheApi.create(spec -> {
spec.provider(new GuavaProvider());
});
- + \ No newline at end of file diff --git a/provider/index.html b/provider/index.html index c31b20a..238245a 100644 --- a/provider/index.html +++ b/provider/index.html @@ -4,13 +4,13 @@ Supported Implementations | Xanthic - +

Supported Implementations

Xanthic currently supports the following implementations:

Cache ProviderProvider ClassMaven ArtifactDiscovery OrderAndroid Support
AndroidXAndroidLruProvidercache-provider-androidx1✔️
Cache2kCache2kProvidercache-provider-cache2k4✔️
CaffeineCaffeineProvidercache-provider-caffeine3
Caffeine3Caffeine3Providercache-provider-caffeine32
Ehcache v3 (heap)EhcacheProvidercache-provider-ehcache8
ExpiringMapExpiringMapProvidercache-provider-expiringmap6
GuavaGuavaProvidercache-provider-guava7✔️
Infinispan (heap)InfinispanProvidercache-provider-infinispan5
- + \ No newline at end of file diff --git a/provider/infinispan/index.html b/provider/infinispan/index.html index 2ffe598..f7278bd 100644 --- a/provider/infinispan/index.html +++ b/provider/infinispan/index.html @@ -4,14 +4,14 @@ Infinispan | Xanthic - +

Infinispan

added in: v0.1.0

Description

This provider uses Infinispan in local, volatile mode to fulfill the Xanthic Cache contract.

Out of the box, Infinispan's distributed or scattered cache options are not (yet) supported.

Note: Infinispan itself depends on Caffeine, so one can achieve a smaller binary by using Caffeine instead, if not also using other features of Infinispan.

Installation

build.gradle
dependencies {
implementation 'io.github.xanthic.cache:cache-provider-infinispan'
}

Usage

Default

CacheApiSettings.getInstance().setDefaultCacheProvider(new InfinispanProvider());

Cache<String, Integer> cache = CacheApi.create(spec -> {
// if spec.provider is not set the default cache provider will be used
});

Spec

Cache<String, Integer> cache = CacheApi.create(spec -> {
spec.provider(new InfinispanProvider());
});
- + \ No newline at end of file