Constructors
constructor
new Redis( options?: ClientOpts ) : Redis
Parameters
Optional options: ClientOpts
Accessors
Protected client
get client( ) : RedisClient
Methods
close
close( ) : Promise < boolean >
delete
delete( keys: string | string [] ) : Promise < number >
Parameters
Returns Promise < number >
expire
expire( key: string , ttl: number ) : Promise < boolean >
Parameters
Returns Promise < boolean >
get
get( key: string ) : Promise < string >
Parameters
Returns Promise < string >
has
has( key: string ) : Promise < boolean >
Parameters
Returns Promise < boolean >
keys
keys( ) : Promise < string [] >
Returns Promise < string [] >
set
set( key: string , value: any , ttl?: number ) : Promise < boolean >
Parameters
key: string
value: any
Optional ttl: number
Returns Promise < boolean >
ttl
ttl( key: string ) : Promise < number >
Parameters
Returns Promise < number >
Legend
Module
Object literal
Variable
Function
Function with type parameter
Index signature
Type alias
Type alias with type parameter
Enumeration
Enumeration member
Property
Method
Interface
Interface with type parameter
Constructor
Property
Method
Index signature
Class
Class with type parameter
Constructor
Property
Method
Accessor
Index signature
Inherited constructor
Inherited property
Inherited method
Inherited accessor
Protected property
Protected method
Protected accessor
Private property
Private method
Private accessor
Static property
Static method
Lazy loads underlying Redis client. This ensures users don't get a module not found error when importing this library without installing the redis package.