module results cache

  • results of modules with specified project tags enabled can be cached
    • there are two module options that control this, "cache" and "cachefound"
      • "cache" can have a value of "public" or "private"
        • "cache":"public" is available to all users
        • "cache":"private" is only available to the logged on user
      • the optional "cachefound" tag can have values of "notify" or "askrecompute"
        • by default (no "cachefound" tag), the cache results are retrieved silently
        • "cache":"notify" will notify the user after job submission that cached results are being shown
        • "cache":"askrecompute" will present the user with the choice of showing previously computed results or recomputing them.
          • we could make this user specific to allow certain users only to recompute, please ask us if you need this.
      • the optional "cachedelete" tag provides an authorized user to delete a cache entry.
  • deleting a job will clear the cached entry
  • caveat: if you remove job the backing files with the file manager, the cached results will be corrupted due to missing files
    • we should probably address this somehow within the generated application
  • N.B. Only numeric field types are currently supported for cached entries (type = integer, float or hidden [with a numeric value as default])
    • this can be extended on need to other types, please let us know your specific need

viewing available cached results

  • a built-in module executable is available for displaying cached results
  • a template example is shown below
  • the important bits to use this module executable are
    • keep most of what is shown in the example... you can change, of course, any labels and the module id of this module
    • make sure the field id "module" has its default value set to the module id of the module creating the cached results (in this case, "flowinducedvibration")
    "moduleid"           : "cachedresultsfiv"
    ,"submitpolicy"      : "all"
    ,"label"             : "Available Results"
    ,"resource"          : "local"
    ,"noreset"           : "true"
    ,"executable"        : "cached_results"
    ,"docrootexecutable" : "ajax/sys_config/cached_results.php"
    ,"uniquedir"         : "on"
    ,"submit_label"      : "Refresh"
    ,"autosubmit"        : "true"
    ,"nojobcontrol"      : "on"
    ,"fields"   : [
            "role"     : "input"
            ,"id"       : "label1"
            ,"label"    : "Available Results"
            ,"type"     : "label"
            "role"     : "input"
            ,"id"       : "module"
            ,"type"     : "hidden"
            ,"default"  : "flowinducedvibration"
            "role"     : "output"
            ,"label"    : ""
            ,"id"       : "outhtml"
            ,"type"     : "html"
Last modified 6 years ago Last modified on Jun 15, 2016, 8:39:45 AM