Skip to content

Commit

Permalink
Updated to Adonis 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaperskyguru committed May 16, 2021
1 parent 337189e commit 7a3b6dd
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 24 deletions.
2 changes: 1 addition & 1 deletion adonis-typings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@
"templates": {
"config": [
"cache.txt"
],
"contracts": [
"cache.txt"
]
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/CacheLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
18 changes: 0 additions & 18 deletions templates/contract/cache.txt

This file was deleted.

0 comments on commit 7a3b6dd

Please sign in to comment.