@@ -22,7 +22,7 @@ export class CacheImpl<Driver extends DriverImpl = any> extends Macroable {
2222 /**
2323 * The drivers responsible for handling cache operations.
2424 */
25- public driver : MemoryDriver = null
25+ public driver : Driver = null
2626
2727 /**
2828 * Creates a new instance of CacheImpl.
@@ -33,13 +33,13 @@ export class CacheImpl<Driver extends DriverImpl = any> extends Macroable {
3333 this . driver = StoreFactory . fabricate (
3434 this . storeName ,
3535 athennaCacheOpts ?. options
36- )
36+ ) as unknown as Driver
3737
3838 this . connect ( athennaCacheOpts )
3939 }
4040
41- public store ( con : 'memory' , options ?: StoreOptions ) : CacheImpl < MemoryDriver >
42-
41+ public store ( store : 'memory' , options ?: StoreOptions ) : CacheImpl < MemoryDriver >
42+ public store ( store : 'memory' | string ) : CacheImpl < MemoryDriver >
4343 /**
4444 * Change the store connection.
4545 *
@@ -48,10 +48,7 @@ export class CacheImpl<Driver extends DriverImpl = any> extends Macroable {
4848 * await Cache.store('redis').set('my:cache:key', 'hello')
4949 * ```
5050 */
51- public store (
52- store : 'memory' | string ,
53- options ?: StoreOptions
54- ) : CacheImpl < Driver > {
51+ public store ( store : 'memory' | string , options ?: StoreOptions ) {
5552 const driver = StoreFactory . fabricate ( store , options ?. options )
5653 const cache = new CacheImpl < typeof driver > ( options )
5754
0 commit comments