 */
 
 import Foundation
+
+public enum Lifecycle {
+    case NotCached
+    case Cached
+    case OneTime
+}
 
 /**
  A simple, elegant, flexible dependency resolver.

    public static func resolve<P, D>(parameters: P, type: String = String(reflecting: D.self), name: String? = nil, cached: Bool = true) -> D? {
        let key = Key(type: type, name: name)
        guard let dependency = dependencies[key] else { return nil }
        return (dependency.resolve(parameters, cached: cached) as D)
    }
    

     - parameter instance: The instance to register.
     - parameter type: Usually the type of `D`, but can be any string.
     - parameter name: An optional name to disambiguate similar `type`s.
     
     - returns: The registration key, which can be used with `unregister`.
     */
    public static func register<D>(instance: D, type: String = String(reflecting: D.self), name: String? = nil) -> Any {
        return register(type: type, name: name, lifecycle: .Cached) { instance }
    }
    
    /**
