summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/doc_src_qcache.qdoc
blob: 66bda6af95ae048410c44c4e82c06a26ebb3c1d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! [0]
QCache<int, Employee> cache;
//! [0]


//! [1]
Employee *employee = new Employee;
employee->setId(37);
employee->setName("Richard Schmit");
...
cache.insert(employee->id(), employee);
//! [1]


//! [2]
QCache<int, MyDataStructure> cache(5000);
//! [2]