Dazzle.TaskCache

g Dazzle.TaskCache Dazzle.TaskCache GObject.Object GObject.Object GObject.Object->Dazzle.TaskCache

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

evict (key)

evict_all ()

get_async (key, force_update, cancellable, callback, *user_data)

get_finish (result)

peek (key)

set_name (name)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

key-copy-func

int

w/co

Key Copy Func

key-destroy-func

int

w/co

Key Destroy Func

key-equal-func

int

w/co

Key Equal Func

key-hash-func

int

w/co

Key Hash Func

populate-callback

int

w/co

Populate Callback

populate-callback-data

int

w/co

Populate Callback Data

populate-callback-data-destroy

int

w/co

Populate Callback Data Destroy

time-to-live

int

w/co

The time to live in milliseconds.

value-copy-func

int

w/co

Value Copy Func

value-destroy-func

int

w/co

Value Destroy Func

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Dazzle.TaskCache(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Dazzle.TaskCacheClass

evict(key)
Parameters:

key (object or None) –

Return type:

bool

evict_all()
get_async(key, force_update, cancellable, callback, *user_data)
Parameters:
get_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Returns:

The result from the cache.

Return type:

object or None

Finish a call to Dazzle.TaskCache.get_async().

peek(key)
Parameters:

key (object or None) – The key for the cache

Returns:

A GObject.Object or None if the key was not found in the cache.

Return type:

GObject.Object or None

Peeks to see key is contained in the cache and returns the matching GObject.Object if it does.

The reference count of the resulting GObject.Object is not incremented. For that reason, it is important to remember that this function may only be called from the main thread.

set_name(name)
Parameters:

name (str) –

Property Details

Dazzle.TaskCache.props.key_copy_func
Name:

key-copy-func

Type:

int

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

Key Copy Func

Dazzle.TaskCache.props.key_destroy_func
Name:

key-destroy-func

Type:

int

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

Key Destroy Func

Dazzle.TaskCache.props.key_equal_func
Name:

key-equal-func

Type:

int

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

Key Equal Func

Dazzle.TaskCache.props.key_hash_func
Name:

key-hash-func

Type:

int

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

Key Hash Func

Dazzle.TaskCache.props.populate_callback
Name:

populate-callback

Type:

int

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

Populate Callback

Dazzle.TaskCache.props.populate_callback_data
Name:

populate-callback-data

Type:

int

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

Populate Callback Data

Dazzle.TaskCache.props.populate_callback_data_destroy
Name:

populate-callback-data-destroy

Type:

int

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

Populate Callback Data Destroy

Dazzle.TaskCache.props.time_to_live
Name:

time-to-live

Type:

int

Default Value:

30000

Flags:

WRITABLE, CONSTRUCT_ONLY

This is the number of milliseconds before an item should be evicted from the cache.

A value of zero indicates no eviction.

Dazzle.TaskCache.props.value_copy_func
Name:

value-copy-func

Type:

int

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

Value Copy Func

Dazzle.TaskCache.props.value_destroy_func
Name:

value-destroy-func

Type:

int

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

Value Destroy Func