Skip to content

Commit

Permalink
rename CacheService to Cache
Browse files Browse the repository at this point in the history
  • Loading branch information
beniaminmunteanu committed Oct 18, 2023
1 parent 5b8422b commit 935e139
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/wallet/backend/src/cache/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface ICacheService<T> {
delete(key: string): Promise<number>
}

export class CacheService<T> implements ICacheService<T> {
export class Cache<T> implements ICacheService<T> {
private namespace: string = 'Testnet:'

constructor(
Expand Down
4 changes: 2 additions & 2 deletions packages/wallet/backend/src/createContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import knex from 'knex'
import { SocketService } from './socket/service'
import { GrantService } from './grant/service'
import { RatesService } from './rates/service'
import { CacheService } from './cache/service'
import { Cache } from './cache/service'
import { RedisClient } from './cache/redis-client'
import { Redis } from 'ioredis'
import { PaymentPointer } from './paymentPointer/model'
Expand Down Expand Up @@ -197,7 +197,7 @@ export const createContainer = (config: Env): Container<Bindings> => {
env: await container.resolve('env'),
rafikiClient: await container.resolve('rafikiClient'),
accountService: await container.resolve('accountService'),
cache: new CacheService<PaymentPointer>(
cache: new Cache<PaymentPointer>(
await container.resolve('redisClient'),
'WMPaymentPointers'
)
Expand Down
4 changes: 2 additions & 2 deletions packages/wallet/backend/src/paymentPointer/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { generateJwk } from '@/utils/jwk'
import axios from 'axios'
import { generateKeyPairSync, getRandomValues } from 'crypto'
import { v4 as uuid } from 'uuid'
import { CacheService } from '../cache/service'
import { Cache } from '../cache/service'
import { PaymentPointer } from './model'

export interface UpdatePaymentPointerArgs {
Expand Down Expand Up @@ -49,7 +49,7 @@ interface PaymentPointerServiceDependencies {
accountService: AccountService
rafikiClient: RafikiClient
env: Env
cache: CacheService<PaymentPointer>
cache: Cache<PaymentPointer>
}

export const createPaymentPointerIfFalsy = async ({
Expand Down

0 comments on commit 935e139

Please sign in to comment.