Alternative Caching with i18next
Browser caching with local storage
import i18next from "i18next";
import ChainedBackend from "i18next-chained-backend";
import LocizeBackend from "i18next-locize-backend";
import LocalStorageBackend from "i18next-localstorage-backend";
i18next
.use(ChainedBackend)
.init({
fallbackLng: "en",
// ... your i18next config
backend: {
backends: [
LocalStorageBackend,
LocizeBackend
],
backendOptions: [{
expirationTime: 7 * 24 * 60 * 60 * 1000 // 7 days
}, {
projectId: "[PROJECTID]",
apiKey: "[APIKEY]",
version: "[VERSION]",
referenceLng: "en"
}]
}
});Server side caching with filesystem
React-native caching with AsyncStorage
Server side Next.js caching with filesystem
Last updated