mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 14:03:06 +00:00
Refactored Data Services
This commit is contained in:
17
src/app/core/cache/cache.reducers.ts
vendored
Normal file
17
src/app/core/cache/cache.reducers.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { combineReducers } from "@ngrx/store";
|
||||
import { RequestCacheState, requestCacheReducer } from "./request-cache.reducer";
|
||||
import { ObjectCacheState, objectCacheReducer } from "./object-cache.reducer";
|
||||
|
||||
export interface CacheState {
|
||||
request: RequestCacheState,
|
||||
object: ObjectCacheState
|
||||
}
|
||||
|
||||
export const reducers = {
|
||||
request: requestCacheReducer,
|
||||
object: objectCacheReducer
|
||||
};
|
||||
|
||||
export function cacheReducer(state: any, action: any) {
|
||||
return combineReducers(reducers)(state, action);
|
||||
}
|
Reference in New Issue
Block a user