Skip to content

memoryConfig not optional for Storage.init as comment says. #330

@martyu

Description

@martyu
  ///
  /// - Parameters:
  ///   - diskConfig: Configuration for disk storage
  ///   - memoryConfig: *Optional*. Pass config if you want memory cache
  /// - Throws: Throw StorageError if any.
  public convenience init(diskConfig: DiskConfig, memoryConfig: MemoryConfig, transformer: Transformer<Value>) throws {
    let disk = try DiskStorage<Key, Value>(config: diskConfig, transformer: transformer)
    let memory = MemoryStorage<Key, Value>(config: memoryConfig)
    let hybridStorage = HybridStorage(memoryStorage: memory, diskStorage: disk)
    self.init(hybridStorage: hybridStorage)
  }

This says memoryConfig should be Optional, but it's not. Not sure which is the typo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions