[plugins-functionality | DONE | Changed ] change clear cache in route to purge browser cache
This commit is contained in:
parent
c265ffc11b
commit
05db374254
|
@ -248,7 +248,7 @@ export class EditCommunityComponent {
|
|||
this.removePhoto();
|
||||
this.subscriptions.push(this.communityService.updateCommunity(
|
||||
this.properties.communityAPI + this.community.communityId, this.communityFb.getRawValue()).subscribe(() => {
|
||||
this._clearCacheService.clearCacheInRoute("Community saved",this.community.communityId,"/");
|
||||
this._clearCacheService.purgeBrowserCache("Community saved",this.community.communityId);
|
||||
this.communityService.getCommunity(this.community.communityId, true).subscribe(community => {
|
||||
NotificationHandler.rise(community.shortTitle + ' has been <b>successfully created</b>');
|
||||
callback(community);
|
||||
|
@ -261,7 +261,7 @@ export class EditCommunityComponent {
|
|||
}));
|
||||
} else {
|
||||
this.subscriptions.push(this.communityService.updateCommunity(this.properties.communityAPI + this.community.communityId, this.communityFb.getRawValue()).subscribe(() => {
|
||||
this._clearCacheService.clearCacheInRoute("Community saved",this.community.communityId,"/");
|
||||
this._clearCacheService.purgeBrowserCache("Community saved",this.community.communityId);
|
||||
this.communityService.getCommunity(this.community.communityId, true).subscribe(community => {
|
||||
NotificationHandler.rise(community.shortTitle + ' has been <b>successfully saved</b>');
|
||||
callback(community);
|
||||
|
|
|
@ -87,7 +87,6 @@ export class RemoveContentProvidersComponent implements OnInit {
|
|||
let index = this.communityContentProviders.indexOf(this.selectedCommunityContentProvider);
|
||||
this.communityContentProviders.splice(index, 1);
|
||||
this.applyFilters();
|
||||
this._clearCacheService.clearCacheInRoute(this.openAIREEntities.DATASOURCE+" removed", this.community.communityId)
|
||||
this._clearCacheService.purgeBrowserCache(this.openAIREEntities.DATASOURCE+" removed", this.community.communityId);
|
||||
this.handleSuccess(this.openAIREEntities.DATASOURCE + ' successfully removed!')
|
||||
this.communityContentProvidersChanged.emit({
|
||||
|
|
|
@ -123,7 +123,6 @@ export class AddProjectsComponent implements OnInit {
|
|||
this.subscriptions.push(this._manageCommunityProjectsService.addProject(this.properties, this.community.communityId, project).subscribe(
|
||||
data => {
|
||||
// this.communityProjects.push(data);
|
||||
this._clearCacheService.clearCacheInRoute(this.openaireEntities.PROJECT+" added", this.community.communityId);
|
||||
this._clearCacheService.purgeBrowserCache(this.openaireEntities.PROJECT+" added", this.community.communityId);
|
||||
|
||||
UIkit.notification(this.openaireEntities.PROJECT+' successfully added!', {
|
||||
|
|
|
@ -131,7 +131,6 @@ export class RemoveProjectsComponent implements OnInit {
|
|||
public confirmedDeleteProject(data: any) {
|
||||
this.subscriptions.push(this._manageCommunityProjectsService.removeProject(this.properties, this.community.communityId, this.selectedCommunityProject.openaireId).subscribe(
|
||||
data => {
|
||||
this._clearCacheService.clearCacheInRoute(this.openaireEntiites.PROJECT+" removed", this.community.communityId);
|
||||
this._clearCacheService.purgeBrowserCache(this.openaireEntiites.PROJECT+" removed", this.community.communityId);
|
||||
NotificationHandler.rise(OpenaireEntities.PROJECT+' successfully removed!');
|
||||
this._getCommunityProjects(this.communitySearchUtils.page, this.keyword,null);
|
||||
|
|
|
@ -344,7 +344,6 @@ export class SubjectsEditFormComponent implements OnInit {
|
|||
}
|
||||
});
|
||||
this._communityService.updateSubjects(this.community.subjects, this.community.fos, this.community.sdg);
|
||||
this._clearCacheService.clearCacheInRoute("Subjects " + message, this.communityId);
|
||||
this._clearCacheService.purgeBrowserCache("Subjects " + message, this.communityId);
|
||||
NotificationHandler.rise('Subjects successfully ' + message + '!')
|
||||
this.loading = false;
|
||||
|
|
Loading…
Reference in New Issue