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

Simplify last commit cache #4

Merged

Conversation

lafriks
Copy link

@lafriks lafriks commented Jan 31, 2020

No description provided.

@lunny
Copy link
Owner

lunny commented Jan 31, 2020

Only a nit. TTL is not a good config name for that. And I think 0 should mean it will never expired. So I still think ENABLED is better.

@lafriks
Copy link
Author

lafriks commented Jan 31, 2020

@lunny added back ;)

@lunny
Copy link
Owner

lunny commented Jan 31, 2020

@lafriks Thanks! And I think the cache ttl default time 16h is too short. I would like to left the default time for last_time as 8760h == 1 year.
The last time is a mapping of (commitid, treepath) -> commitid, it's not a branch or tag name. Except one commit was deleted from the repository, there is no reason to expire the cache at the short time.

@lafriks
Copy link
Author

lafriks commented Jan 31, 2020

sure why not, I'm not against it

@lunny lunny merged this pull request into lunny:lunny/cache_file_last_commit3 Jan 31, 2020
@lafriks lafriks deleted the cache_file_last_commit3 branch January 31, 2020 16:27
lunny pushed a commit that referenced this pull request Jun 26, 2022
* Prototyping

* Start work on creating offsets

* Modify tests

* Start prototyping with actual MPH

* Twiddle around

* Twiddle around comments

* Convert templates

* Fix external languages

* Fix latest translation

* Fix some test

* Tidy up code

* Use simple map

* go mod tidy

* Move back to data structure

- Uses less memory by creating for each language a map.

* Apply suggestions from code review

Co-authored-by: delvh <[email protected]>

* Add some comments

* Fix tests

* Try to fix tests

* Use en-US as defacto fallback

* Use correct slices

* refactor (#4)

* Remove TryTr, add log for missing translation key

* Refactor i18n

- Separate dev and production locale stores.
- Allow for live-reloading in dev mode.

Co-authored-by: zeripath <[email protected]>

* Fix live-reloading & check for errors

* Make linter happy

* live-reload with periodic check (#5)

* Fix tests

Co-authored-by: delvh <[email protected]>
Co-authored-by: 6543 <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
Co-authored-by: zeripath <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants