次の方法で共有


SQLiteDatabase.SetMaxSqlCacheSize(Int32) Method

Definition

Sets the maximum size of the prepared-statement cache for this database.

[Android.Runtime.Register("setMaxSqlCacheSize", "(I)V", "GetSetMaxSqlCacheSize_IHandler")]
public virtual void SetMaxSqlCacheSize (int cacheSize);
[<Android.Runtime.Register("setMaxSqlCacheSize", "(I)V", "GetSetMaxSqlCacheSize_IHandler")>]
abstract member SetMaxSqlCacheSize : int -> unit
override this.SetMaxSqlCacheSize : int -> unit

Parameters

cacheSize
Int32

the size of the cache. can be (0 to #MAX_SQL_CACHE_SIZE)

Attributes

Exceptions

if input cacheSize > 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.

Java documentation for android.database.sqlite.SQLiteDatabase.setMaxSqlCacheSize(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to