mirror of
https://github.com/friendica/friendica
synced 2025-04-24 23:50:20 +00:00
Increase cache lifespan / clear cache upon changes
This commit is contained in:
parent
a880d8b982
commit
73019284ce
7 changed files with 46 additions and 13 deletions
|
@ -46,7 +46,7 @@ class Pin extends BaseApi
|
|||
DI::mstdnError()->RecordNotFound();
|
||||
}
|
||||
|
||||
Post\Collection::add($this->parameters['id'], Post\Collection::FEATURED);
|
||||
Post\Collection::add($this->parameters['id'], Post\Collection::FEATURED, $uid);
|
||||
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid)->toArray());
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ class Unpin extends BaseApi
|
|||
DI::mstdnError()->RecordNotFound();
|
||||
}
|
||||
|
||||
Post\Collection::remove($this->parameters['id'], Post\Collection::FEATURED);
|
||||
Post\Collection::remove($this->parameters['id'], Post\Collection::FEATURED, $uid);
|
||||
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid)->toArray());
|
||||
}
|
||||
|
|
|
@ -60,9 +60,9 @@ class Pin extends BaseModule
|
|||
$pinned = !$item['featured'];
|
||||
|
||||
if ($pinned) {
|
||||
Post\Collection::add($item['uri-id'], Post\Collection::FEATURED);
|
||||
Post\Collection::add($item['uri-id'], Post\Collection::FEATURED, local_user());
|
||||
} else {
|
||||
Post\Collection::remove($item['uri-id'], Post\Collection::FEATURED);
|
||||
Post\Collection::remove($item['uri-id'], Post\Collection::FEATURED, local_user());
|
||||
}
|
||||
|
||||
// See if we've been passed a return path to redirect to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue