Count total number of cached kernels.
(self)
| 215 | return results |
| 216 | |
| 217 | def count_cached_kernels(self) -> int: |
| 218 | """Count total number of cached kernels.""" |
| 219 | with sqlite3.connect(self.db_path) as conn: |
| 220 | cursor = conn.cursor() |
| 221 | cursor.execute("SELECT COUNT(*) FROM kernel_metadata") |
| 222 | return cursor.fetchone()[0] |
| 223 | |
| 224 | def clear_cache(self): |
| 225 | """Clear all cached kernels.""" |