58789: Ability to clear request cache from index

This commit is contained in:
Kristof De Langhe
2018-11-26 13:18:17 +01:00
parent c493fc4003
commit 8be40c31f6
5 changed files with 133 additions and 11 deletions

View File

@@ -8,7 +8,8 @@ import { IndexName } from './index.reducer';
*/
export const IndexActionTypes = {
ADD: type('dspace/core/index/ADD'),
REMOVE_BY_VALUE: type('dspace/core/index/REMOVE_BY_VALUE')
REMOVE_BY_VALUE: type('dspace/core/index/REMOVE_BY_VALUE'),
REMOVE_BY_SUBSTRING: type('dspace/core/index/REMOVE_BY_SUBSTRING')
};
/* tslint:disable:max-classes-per-file */
@@ -60,6 +61,30 @@ export class RemoveFromIndexByValueAction implements Action {
this.payload = { name, value };
}
}
/**
* An ngrx action to remove multiple values from the index by substring
*/
export class RemoveFromIndexBySubstringAction implements Action {
type = IndexActionTypes.REMOVE_BY_SUBSTRING;
payload: {
name: IndexName,
value: string
};
/**
* Create a new RemoveFromIndexByValueAction
*
* @param name
* the name of the index to remove from
* @param value
* the value to remove the UUID for
*/
constructor(name: IndexName, value: string) {
this.payload = { name, value };
}
}
/* tslint:enable:max-classes-per-file */