Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move CappedMemoryCache to OCP #33064

Merged
merged 1 commit into from Jul 18, 2022
Merged

Conversation

CarlSchwan
Copy link
Member

@CarlSchwan CarlSchwan commented Jun 29, 2022

This is an helpful helper that should be used in more place than just
server and this is already the case with groupfodlers, deck, user_oidc
and more using it, so let's make it public

how to port your app

find lib -iname '*.php' -exec sed -i 's/OC\\Cache\\Capped/OCP\\Cache\\Capped/g' {} \;

@CarlSchwan CarlSchwan added the 3. to review Waiting for reviews label Jun 29, 2022
@CarlSchwan CarlSchwan added this to the Nextcloud 25 milestone Jun 29, 2022
@CarlSchwan CarlSchwan requested a review from a team June 29, 2022 13:36
@CarlSchwan CarlSchwan self-assigned this Jun 29, 2022
@CarlSchwan CarlSchwan requested review from icewind1991, blizzz and skjnldsv and removed request for a team June 29, 2022 13:36
@CarlSchwan CarlSchwan force-pushed the feat/capped-memorycache-ocp branch 4 times, most recently from c857fa5 to 62681dd Compare June 29, 2022 14:53
Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More return type hints. Ok to have the concrete implementation in the public namespace in this case.

/**
* @since 25.0.0
*/
public function remove($key) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function remove($key) {
public function remove($key): bool {

* @inheritdoc
* @since 25.0.0
*/
public function clear($prefix = '') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function clear($prefix = '') {
public function clear($prefix = ''): bool {

* @return T[]
* @since 25.0.0
*/
public function getData() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function getData() {
public function getData(): array {

}


private function garbageCollect() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private function garbageCollect() {
private function garbageCollect(): void {

This is an helpful helper that should be used in more place than just
server and this is already the case with groupfodlers, deck, user_oidc
and more using it, so let's make it public

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan CarlSchwan merged commit f6b37e6 into master Jul 18, 2022
@CarlSchwan CarlSchwan deleted the feat/capped-memorycache-ocp branch July 18, 2022 08:32
@skjnldsv skjnldsv mentioned this pull request Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants