mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 23:13:04 +00:00
58789: Ability to clear request cache from index
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
Reference in New Issue
Block a user