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

[Bug] Evo 3.1.29 getCacheFolder #490

Open
Nicola1971 opened this issue Oct 26, 2024 · 8 comments
Open

[Bug] Evo 3.1.29 getCacheFolder #490

Nicola1971 opened this issue Oct 26, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@Nicola1971
Copy link

Nicola1971 commented Oct 26, 2024

Summary

Evo 3.1.29 return just 'cache/' with $modx->getCacheFolder()

Steps to reproduce.

Evo 1.4.35 with $modx->getCacheFolder()

'assets/cache/'

Evo 3.1.29 with $modx->getCacheFolder()

'cache/' instead of 'core/storage/bootstrap'

Observed behavior

EvoCMS version

Evo 3.1.29

PHP version

8.1.29

@Nicola1971 Nicola1971 added bug Something isn't working not confirmed This issue is not confirmed labels Oct 26, 2024
@Pathologic Pathologic removed the not confirmed This issue is not confirmed label Oct 26, 2024
@Pathologic
Copy link
Contributor

What's your case? Do you need to cache something?

@Nicola1971
Copy link
Author

Just testing a Evo 1.4 plugin with Evo 3x.
Anyway, I just found this bug, reported by you, five years ago :) evolution-cms/evolution#998

Pathologic added a commit that referenced this issue Oct 29, 2024
getCacheFolder method is deprecated and will be removed in 3.3 branch
@Pathologic
Copy link
Contributor

Pathologic commented Oct 29, 2024

@Nicola1971 I've declared this method as deprecated, so it would be better not to use it at all. In the case of your PageCacheManager plugin, you needn't getCacheFolder, because you can call $modx->clearCache($doc_id) instead of all this code: https://github.com/Nicola1971/PageCacheManager/blob/main/install/assets/plugins/PageCacheManager.tpl#L64-L101;

@Nicola1971
Copy link
Author

Is there anyway a replacement for getCacheFolder? without hardcoding the path?
I didn't know you could use clearcache with doc_id! I don't think I ever read that in the documentation. Thanks a lot!

@Nicola1971
Copy link
Author

clearCache($doc_id) streamlined my code a lot :)

@Pathologic
Copy link
Contributor

I don't think we need a replacement, because there's Storage facade in 3.x.

@Nicola1971
Copy link
Author

is there still clearcache on 3x?

@Pathologic
Copy link
Contributor

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants