Lravel 13 compatibility and optional caching#149
Closed
jszd2022 wants to merge 14 commits into
Closed
Conversation
Hungarian localization
…d of static config('app.locale')
Made caching optional & updated cacheKey generation to use app()->getLocale()
Decoupled World locale from app locale
Laravel 13 support, added PHPDoc to WorldHelper
Added cache parameter to api requests
Owner
|
@jszd2022 thank you for all the effort you did here. |
Contributor
Author
|
The main idea is limiting storage usage, in case of file or database caching. In my use-case I cache a few often used country's states and cities, but don't cache the others, because they are rarely needed, so response time is not a priority. |
Owner
|
@jszd2022 I apologise in advance if i am asking you for more. PR#1 we can merge right away. Thank you in advance |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Medium changes
->toArray()) andcollect()the cached data back to collectionswithCaching()andwithoutCaching()methods toWorldHelper::classto make caching optional; Caching default isEnabled can be set inconfig/world.php, after eachBaseAction.execute()call the isEnabled resets to it's default value set in the configWorldHelperfrom the app locale; if not specified withWorldHelper::setLocale()the locale defaults to the app's locale, else they are separately settable.Minor changes
cacheKeygeneration to use app()->getLocale() instead ofconfig(app.locale)