mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
dependency upgrades, server and platform module updates, linting wip
This commit is contained in:
10
src/app/core/cache/response-cache.service.ts
vendored
10
src/app/core/cache/response-cache.service.ts
vendored
@@ -18,13 +18,13 @@ import { Response } from "./response-cache.models";
|
||||
export class ResponseCacheService {
|
||||
constructor(
|
||||
private store: Store<ResponseCacheState>
|
||||
) {}
|
||||
) { }
|
||||
|
||||
add(key: string, response: Response, msToLive: number): Observable<ResponseCacheEntry> {
|
||||
if (!this.has(key)) {
|
||||
// this.store.dispatch(new ResponseCacheFindAllAction(key, service, scopeID, paginationOptions, sortOptions));
|
||||
this.store.dispatch(new ResponseCacheAddAction(key, response, new Date().getTime(), msToLive));
|
||||
}
|
||||
if (!this.has(key)) {
|
||||
// this.store.dispatch(new ResponseCacheFindAllAction(key, service, scopeID, paginationOptions, sortOptions));
|
||||
this.store.dispatch(new ResponseCacheAddAction(key, response, new Date().getTime(), msToLive));
|
||||
}
|
||||
return this.get(key);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user