YapDatabaseConnectionConfig

@interface YapDatabaseConnectionConfig : NSObject <NSCopying>

Allows you to configure the default values for new connections.

When you create a connection via [YapDatabase newConnection], that new connection will inherit its initial configuration via these connectionDefaults. Of course, the connection may then override these default configuration values, and configure itself as needed.

Changing the connectionDefault values only affects future connections that will be created. It does not affect connections that have already been created.

  • If YES, then future connections will be created with their objectCache enabled.

    The default value is YES.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) BOOL objectCacheEnabled;

    Swift

    var objectCacheEnabled: Bool { get set }
  • Allows you to configure the default size of the objectCache for future connections. A value of zero == unlimited

    The default value is 250.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSUInteger objectCacheLimit;

    Swift

    var objectCacheLimit: UInt { get set }
  • If YES, then future connections will be created with their metadataCache enabled.

    The default value is YES.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) BOOL metadataCacheEnabled;

    Swift

    var metadataCacheEnabled: Bool { get set }
  • Allows you to configure the default size of the metadataCache for future connections. A value of zero == unlimited

    The default value is 250.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSUInteger metadataCacheLimit;

    Swift

    var metadataCacheLimit: UInt { get set }
  • Allows you to configure how the YapDatabaseConnection should flush memory, when the OS broadcasts a low-memory warning.

    The default value is YapDatabaseConnectionFlushMemoryFlags_All

    Declaration

    Objective-C

    @property (assign, readwrite, atomic)
        YapDatabaseConnectionFlushMemoryFlags autoFlushMemoryFlags;

    Swift

    var autoFlushMemoryFlags: YapDatabaseConnectionFlushMemoryFlags { get set }