Anybody automate purge caches for their threads?

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Anybody automate purge caches for their threads?

  • Creator
    Topic
  • #49581
    Nate Kruse
    Participant

    Background – We want our clinical users to be able to update the .csv files that we use for lookup Tables (less work for me..yeah!).

Viewing 4 reply threads
  • Author
    Replies
    • #62568
      Charlie Bursell
      Participant

      You can do what you propose but it may not always work.  What if the process is extremly busy or blocked?  The purgex may not run.

      I do this all the time.  Cloverleaf Tables are meant to be static and are not designed for dynamic tables.

      I have them put the CSV file in a known directory with a know name.  When my Tcl proc starts, I read the table into a keyed list or array (I pefer array) – be wary of duplicate keys.  I also store the last modified time (mtime).  With each invocation of the proc, I stat the file for mtime.  If different than the one I saved, I reload the file else I use the table as is.

      There is additional overhaed involved but not as much as building a new Cloverleaf table and running purgex. It makes the whole thing completely automatic.

    • #62569
      Jim Kosloskey
      Participant

      Nate,

      I think you just list all of the threads you want purged comma seperated followed by the purgex in the -c switch of the hcicmd.

      Something like this I think:

      hcicmd -p -c “thread_1,thread-2,etc… purgex”.

      However, just be aware purge caches refreshes more than just the Tables you just modified/created – and you may not always like the results.

      Jim Kosloskey

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #62570
      Nate Kruse
      Participant

      Thanks for the suggestions and the words of caution.  At least this is possible, but might not be the way we want to go now.  I’ll have to see what the team says.

      Thanks again!

      Nate.

    • #62571
      Gary Atkinson
      Participant

      Were on 5.5 rev.1  When we issue a purge caches command from Network Monitor on the process called “charges”, all threads were caches in the site and not just in the charges process where the command was issued.  So, I tried it from the command line using the syntax:

      hcicmd -p charges

      hcicmd> charges purgex

      Response:

      XLT-related caches purged

      Log says:

      [cmd :cmd :INFO/0:  charges_cmd:10/25/2007 13:46:41] Receiving a command

      [cmd :cmd :INFO/0:  charges_cmd:10/25/2007 13:46:41] Receiving a command

      [cmd :cmd :INFO/0:  charges_cmd:10/25/2007 13:46:41] Received command: ‘charges purgex’

      [cmd :cmd :INFO/0:  charges_cmd:10/25/2007 13:46:41] Doing ‘purgex’ command with args ‘

      So, the process “charges” only gets purged, correct  ❓ I need to make some changes in a table that the engine is currently using…

    • #62572
      Mark Thompson
      Participant

      Gary,

      You are correct.  In 5.5 Rev 1 only the GUI purge caches is broken (because it puts too many threads in the command).  The command line version works correctly.

      - Mark Thompson
      HealthPartners

Viewing 4 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,127
Forums
28
Topics
9,300
Replies
34,445
Topic Tags
288
Empty Topic Tags
10