1
/* Copyright 2016 Software Freedom Conservancy Inc.
3
* This software is licensed under the GNU Lesser General Public License
4
* (version 2.1 or later). See the COPYING file in this distribution.
7
public class ContactListStoreCache {
9
private Gee.HashMap<Geary.ContactStore, ContactListStore> cache =
10
new Gee.HashMap<Geary.ContactStore, ContactListStore>();
12
public ContactListStore create(Geary.ContactStore contact_store) {
13
ContactListStore list_store = new ContactListStore(contact_store);
15
this.cache.set(contact_store, list_store);
17
list_store.load.begin();
22
public ContactListStore? get(Geary.ContactStore contact_store) {
23
return this.cache.get(contact_store);
26
public void unset(Geary.ContactStore contact_store) {
27
this.cache.unset(contact_store);