The dcachesh program

dcachesh - dcachesh is the dcache shell and allows for interactive dcache manipulations.




Usage examples.
Show available Commands.
Where to find related information.
Show version: dcachesh (dcache) 0.6.1-beta2.
Show a list of options or the long help on one. The use with an argument shows the long help text of that option, without an argument it will list all options.
Show longer help texts for all or one option.


 openwrite t.db
 add key1 value1
 add key2 val2
 echo ---- try to find these entries before the commit (XFAIL)
 findall key1
 findall key2
 echo ---- try to find them after the commit, before the replay (XFAIL)
 findall key1
 findall key2
 echo ---- try to find them after the replay
 findall key1
 findall key2


========== OPEN/CLOSE ==========

openread FILENAME

  Open FILENAME for reading.

openwrite FILENAME

  Open FILENAME for writing.

close [needs open cache]

  Close an open cache.

========== LOCKING ==========

lockshared [needs open cache]

  Lock the cache so that other processes may still read from it.
  Use this if you will not change the content of the cache

lockexcl [needs open cache]

  Lock the cache so that other processes may not read from it.
  Use this if you plan to change the content of the cache

unlock [needs open cache]

  Release a lock.

========== SYNCHRONIZATION ==========

flush [needs open cache]

  Flush cache changes to operating system buffer.

sync [needs open cache]

  Call flush and fsync() to force changes to disk.

autosync [ON|OFF] [needs open cache]

  Set autosync to ON or OFF.

========== TRANSACTIONS ==========

start [needs open cache]

  Start a transaction.

cancel [needs open cache]

  Cancel a transaction.

commit [needs open cache]

  Commit a transaction.

replay [needs open cache]

  Replay unfinished transactions.

========== DATA OPERATIONS ==========

add KEY VALUE [needs open cache]

  Add a new record with key KEY and content VALUE.
  Note that this will not delete other records with KEY.

delete KEY NUMBER-or-ALL [needs open cache]

  Delete one or all records matching KEY. Usage:
  - delete KEY 47
    delete the 47th record with key KEY.
  - delete KEY ALL
    delete all records with key KEY.

findfirst KEY [needs open cache]

  Find the first record matching KEY.

findnext [needs open cache]

  Find the next record matching KEY.
  This may be used after a findfirst command.

findall KEY [needs open cache]

  Find all records matching KEY.

========== MISC ==========


  Print STRING and STRING2


  Leave the program if no cache file is open.


  Leave the program even if the a cache file is open.

callback [none|print|fail] [needs open cache]

  Set the delete callback to
  - none:  do nothing.
  - fail:  let the operation fail.
  - print: print the record just before it is deleted
  This is determines how this program handles automatical deletion.

help [command]

  Show help on all or one command.


Copyright (C) 2003,2004,2005 Uwe Ohse.

The software comes with NO WARRANTY, to the extent permitted by law.

This package is published under the terms of the GNU General Public License version 2. Later versions of the GPL may or may not apply, see


Uwe Ohse, <>.


Report bugs to


dcache_intro(7) is the introduction to dcache.

The dcache homepage is at