Skip to content
New issue

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

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

Already on GitHub? # to your account

Maximum cache duration? #48

Closed
Daniel15 opened this issue Dec 3, 2019 · 4 comments · Fixed by #57
Closed

Maximum cache duration? #48

Daniel15 opened this issue Dec 3, 2019 · 4 comments · Fixed by #57
Milestone

Comments

@Daniel15
Copy link

Daniel15 commented Dec 3, 2019

I see that there is a MinimumCacheTimeout option. Is there some way to have a corresponding maximum cache timeout? I want to just cache responses for a short period of time, rather than for their entire TTL.

@MichaCo
Copy link
Owner

MichaCo commented Dec 3, 2019

No, there is no option for max duration yet.
I agree, it would be a good thing though ;)

@Daniel15
Copy link
Author

Daniel15 commented Dec 9, 2019

Thanks for confirming! My use case is that I want a cache with a fairly short cache duration in order to cache lookups that are very frequently performed, without wasting space in the cache for lookups that are not performed as frequently.

@MichaCo MichaCo modified the milestones: Future, 1.3.0 Feb 29, 2020
MichaCo added a commit that referenced this issue Mar 1, 2020
… long any records should be cached. see #48

* Fixing a bug with non-empty OPT records, see #55.
* Changing the logic which removed the EDNS opt record from the results. The record will now be in the additonal records and can have data (the raw bytes).
* Added version compatibility testing to make sure I'm not breaking stuff. Optional parameters are not fun sometimes ~~
MichaCo added a commit that referenced this issue Mar 2, 2020
* some minor things

* + Removing the disable server logic which was a bit wanky.
+ Removing cache by server. In DNS all servers should have the same answer for a question, no need to cache per server!
+ (work in progress) keep API stable (from 1.1.0 on), adding unit tests
+ (work in progress) query options & tests

* * Added max cache timeout which can be used to set an upper limit how long any records should be cached. see #48
* Fixing a bug with non-empty OPT records, see #55.
* Changing the logic which removed the EDNS opt record from the results. The record will now be in the additonal records and can have data (the raw bytes).
* Added version compatibility testing to make sure I'm not breaking stuff. Optional parameters are not fun sometimes ~~

* Update azure-pipelines-ci.yml for Azure Pipelines

* Update azure-pipelines-ci.yml for Azure Pipelines

* cleanup

* Update azure-pipelines-ci.yml for Azure Pipelines

* Update azure-pipelines-ci.yml for Azure Pipelines

* Update azure-pipelines-ci.yml for Azure Pipelines

* trying to fix build part 10

* another build update

* Readme update

* Update azure-pipelines-ci.yml pack build config

* trying to change nuget versioning

* Update azure-pipelines-ci.yml for Azure Pipelines

* Update azure-pipelines-ci.yml for Azure Pipelines

* Test build pack

* Test build pack - version suffix somehow teleports from one task to another?

* Test build pack - version suffix somehow teleports from one task to another?

* Test build pack - version suffix somehow teleports from one task to another?

* Test build pack - version suffix somehow teleports from one task to another?

* Test build pack - version suffix somehow teleports from one task to another?

2nd pack still doesn't work, just ignores anything passed into arguments it seems?

* Test build pack - version suffix somehow teleports from one task to another?

2nd pack still doesn't work, just ignores anything passed into arguments it seems?

* Test build pack - version suffix somehow teleports from one task to another?

2nd pack still doesn't work, just ignores anything passed into arguments it seems?

* new pack script

* new pack script - publish

seems to finally work, testing publish now

* changing to new icon tag

* Update azure-pipelines-ci.yml for Azure Pipelines

* testing multiple jobs

* build configuration not working

* build configuration..

* multi build

* multi build

* multi build targeting

* disabling testing on linux for now

* add master branch as trigger

[skip ci]
@MichaCo
Copy link
Owner

MichaCo commented Mar 5, 2020

Hi @Daniel15, I added that feature with the latest PR, you can find the setting / code here
This will work the same way as the minimum setting but as a upper limit.
Is that what you had in mind?

@MichaCo MichaCo linked a pull request Mar 7, 2020 that will close this issue
@MichaCo MichaCo closed this as completed Mar 7, 2020
@Daniel15
Copy link
Author

Daniel15 commented Mar 7, 2020

Thanks! I'll take a look when I get some free time :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants