nager / Nager.PublicSuffix

.NET public suffix domain parser
MIT License
155 stars 22 forks source link

New ctor to take initialized DomainDataStructure #36

Closed fcallejon closed 5 years ago

fcallejon commented 5 years ago
tinohager commented 5 years ago

You could also put the whole DomainParser in a singletone, where do you see the advantage of your variant?

fcallejon commented 5 years ago

That is another approach alright, but this way I can cache the entire tree the way I see fit (with expiration and so on) independently from the DomainParse and not be hit by itś initialization each time I want to use it.

The MVC singleton change it's just as an example, it can be rolled back.

tinohager commented 5 years ago

@fcallejon Thanks, i have push a new version