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

About Config class conflicts #37

Closed
arden opened this issue Apr 28, 2016 · 5 comments
Closed

About Config class conflicts #37

arden opened this issue Apr 28, 2016 · 5 comments

Comments

@arden
Copy link

arden commented Apr 28, 2016

ours project have a Config class, and you Cache project have a Config class also,
now there have some conflicts both Config class,
What should I do?

let config = Cache.Config(
// Your front cache type
frontKind: .Memory,
// Your back cache type
backKind: .Disk,
// Expiry date that will be applied by default for every added object
// if it's not overridden in the add(key: object: expiry: completion:) method
expiry: .Date(NSDate().dateByAddingTimeInterval(7 * 24 * 60 * 60 * 60)),
// Maximum size of your cache storage
maxSize: 10000)

use Cache.Config also not.

@dagio
Copy link

dagio commented Jun 27, 2016

Same problem here

@onmyway133
Copy link
Contributor

@arden @dagio Thanks for raising it out. We're aware of it, too. The reason is we have Cache as a class, so it steals the Cache namespace.

@dagio
Copy link

dagio commented Jun 27, 2016

@onmyway133 The Cache class name seems legit. Maybe renaming the pod to have a more unique name without the conflict could be a solution. That could be in a 2.0 release the keep semver ?

@vadymmarkov
Copy link
Contributor

@onmyway133 @zenangst @RamonGilabert I think it's a bit late to rename the pod. Maybe it would be easier to rename Cache class to something like StrictCache?

@dagio
Copy link

dagio commented Jun 30, 2016

Wether you change the pod name or the class name, you will introduce a BC break. I would have rename the pod name to something like : CacheKit, CacheFramework, SimpleCache, ...
Cache class name is perfectly valid. On the other hand the framework name should be unique.
Unfortunately there is no easy way to solve this...

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

No branches or pull requests

4 participants