mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Update browser cache when images are updated (#389)
This commit is contained in:
@@ -88,6 +88,10 @@ export const Studio: FunctionComponent<IProps> = (props: IProps) => {
|
||||
try {
|
||||
if (!isNew) {
|
||||
const result = await updateStudio();
|
||||
if (image) {
|
||||
// Refetch image to bust browser cache
|
||||
await fetch(`/studio/${result.data.studioUpdate.id}/image`, { cache: "reload" });
|
||||
}
|
||||
setStudio(result.data.studioUpdate);
|
||||
} else {
|
||||
const result = await createStudio();
|
||||
|
||||
@@ -59,6 +59,10 @@ export const Performer: FunctionComponent<IPerformerProps> = (props: IPerformerP
|
||||
try {
|
||||
if (!isNew) {
|
||||
const result = await updatePerformer({variables: performer as GQL.PerformerUpdateInput});
|
||||
if (performer.image) {
|
||||
// Refetch image to bust browser cache
|
||||
await fetch(`/performer/${result.data.performerUpdate.id}/image`, { cache: "reload" });
|
||||
}
|
||||
setPerformer(result.data.performerUpdate);
|
||||
} else {
|
||||
const result = await createPerformer({variables: performer as GQL.PerformerCreateInput});
|
||||
|
||||
Reference in New Issue
Block a user