(db)
| 108 | |
| 109 | |
| 110 | def test_query_cache_size(db): |
| 111 | table = db.table('table3', cache_size=1) |
| 112 | query = where('int') == 1 |
| 113 | |
| 114 | table.insert({'int': 1}) |
| 115 | table.insert({'int': 1}) |
| 116 | |
| 117 | assert table.count(query) == 2 |
| 118 | assert table.count(where('int') == 2) == 0 |
| 119 | assert len(table._query_cache) == 1 |
| 120 | |
| 121 | |
| 122 | def test_lru_cache(db): |