Android.Database.Sqlite.SQLiteDatabase.SetMaxSqlCacheSize Method
Sets the maximum size of the prepared-statement cache for this database. (size of the cache = number of compiled-sql-statements stored in the cache).

Syntax

[Android.Runtime.Register("setMaxSqlCacheSize", "(I)V", "GetSetMaxSqlCacheSize_IHandler")]
public virtual void SetMaxSqlCacheSize (int cacheSize)

Parameters

cacheSize
the size of the cache. can be (0 to SQLiteDatabase.MaxSqlCacheSize)

Exceptions

TypeReason
Java.Lang.IllegalStateExceptionif input cacheSize > SQLiteDatabase.MaxSqlCacheSize.

Remarks

Sets the maximum size of the prepared-statement cache for this database. (size of the cache = number of compiled-sql-statements stored in the cache).

Maximum cache size can ONLY be increased from its current size (default = 10). If this method is called with smaller size than the current maximum value, then IllegalStateException is thrown.

This method is thread-safe.

[Android Documentation]

Requirements

Namespace: Android.Database.Sqlite
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11