diff --git a/adonis-typings/index.ts b/adonis-typings/index.ts index 2093f1a..2116ea4 100644 --- a/adonis-typings/index.ts +++ b/adonis-typings/index.ts @@ -7,7 +7,7 @@ * file that was distributed with this source code. */ -declare module '@ioc:Kaperskyguru/Adonis-cache' { +declare module '@ioc:Kaperskyguru/Adonis-Cache' { /** * Shape of adonis-cache config. */ diff --git a/package.json b/package.json index 7a505ac..c02a880 100644 --- a/package.json +++ b/package.json @@ -90,9 +90,6 @@ "templates": { "config": [ "cache.txt" - ], - "contracts": [ - "cache.txt" ] } }, diff --git a/src/CacheLoader.ts b/src/CacheLoader.ts index 7885fb8..24d5835 100644 --- a/src/CacheLoader.ts +++ b/src/CacheLoader.ts @@ -41,14 +41,14 @@ class CacheLoader { } private _getConfig(name: String): string { - return this.app.use('Adonis/Src/Config').get(`cache.${name}`) + return this.app.container.use('Adonis/Core/Config').get(`cache.${name}`) } private _setConfig(name: String, value: any) { const config = this._getConfig(name) if (config) { return } - this.app.use('Adonis/Src/Config').set(`cache.${name}`, value) + this.app.container.use('Adonis/Core/Config').set(`cache.${name}`, value) } } diff --git a/templates/contract/cache.txt b/templates/contract/cache.txt deleted file mode 100644 index 240b253..0000000 --- a/templates/contract/cache.txt +++ /dev/null @@ -1,18 +0,0 @@ - -/* - * @kaperskyguru/adonis-cache - * - * (c) Solomon Eseme - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -import Env from '@ioc:Adonis/Core/Env' -import { CacheConfig } from '@ioc:Kaperskyguru/Adonis-cache' - -const cacheConfig: CacheConfig = { - driver: Env.get('CACHE_DRIVER') as string, -} - -export default cacheConfig \ No newline at end of file