template<class key, class val>
class cachedDBM_base : public base_map<key,val>
  int max_elem;   /* limit number of elements to this value */
  void init(const char *fname, char mode='w'); /* open database file */
  void Init(TCL_args args); /* TCL access to init() */
  void close();    /* commit and close database file */
  bool opened();   /* is a database attached? */
  bool key_exists(const key& k); /* does the key exist in db */
  val& operator[] (const key& k); /* access element with key k */
  void commit();    /* write any changes out to the file, and clear cache */
  void del(key k); /* delete key from database (but not cache!) */    
  key firstkey();  /* return first key in database */
  key nextkey();   /* return next key in database in an iteration */ 
  int eof();       /* true if all keys have been accessed */
  KeyValueIterator begin() const;
  KeyValueIterator end() const;
  KeyIterator keys.begin() const;
  KeyIterator keys.end() const;