Category:Resource data caches

From Catglobe Wiki
Jump to: navigation, search



Resource data caches

Resource data caches are created from inside the resource lists. The resource lists that currently allow us storing their data as data caches are:

  • User
  • Group
  • Project
  • Folder
  • Questionnaire
  • Report
  • Product
  • Task
  • Test case
  • Invoice

The first thing we need to consider when making a resource cache is which resources we want to include in the data cache. This is simply done by going to the resource list of the resource type that you want to cache and then make the correct search. The returned list will be your array of records in your data cache. The resource cache does not actually save the records, but rather the search that created them. So if you set the resource cache to update automatically, it will on each rebuild include or exclude those resources that now fulfill (or do not fulfill) the initially used search criteria.

Since resources returned depend on having minimum observer access to such resources there is a logic that is important to understand - namely that included resources in the cache when the cache is being rebuilt always assumes that the "rebuilding user" is the creator of the resource cache; i.e. it is NOT based on the access to resources of the user that clicks the "rebuild" button. This ensures that the resources included will not change drastically when other people than the creator are assigned the responsibility of updating the resource cache.

With the search done, in order to actually generate the resource cache, you must use the "Generate cache" button that you will find in the tools bar.

ToolsBar

Clicking this will bring up the resource cache specification editor, which you will see an example of below.

RCS58-5

Besides having to decide what the rules are for the resources that will be included, we will also need to decide the name of the resource cache specification, pathto place it (since it is a resource in itself), how often it should be updated (and get the newest array of resources based on the presented search criteria), and what language the RCS should be made in (since there are many of the values that are language specific for columns of a generated resource cache).

The conditions area is currently only used for specifying the time registration to be included. To read more about conditions for time registration column please click here.

But just as importantly as these information is the selection of which columns should be included in the resource cache. Since all resource types have a very large number of information related to them, it may be a good idea to carefully consider which columns to include, since too many columns may make the resource cache very heavy to use. In order to see a full list of columns and how they are represented in the final cache, please refer to the list of resource cache columns, which you will find links to at the bottom of this page.

When you are happy with your selections you can save the resource cache using the save button. If you are editing a resource there are two more buttons that you can use. One is the view button, which will show you the data table generated as a result of your resource cache specifications. The other button is the 'criteria' button, which will open the large search control with the filters that you initially set for the resource cache. If you then wish to change these criteria it can be done here.

Although the general logic is, that one resource returned from the search will create one row in the resource data cache, there are cases where this will not be so. This concerns resource caches where the user chooses to include either invoice detail columns, time registration columns or CATI contact columns. These special cases are explained below.

Build logic: CATI contact columns

When we are generating caches for questionnaires it is important that we understand one major difference -- caches may have more than one row per questionnaire! This will happen when we choose to include columns that take information from the answer sheet or CATI contact records. The number of rows in our cache that an invoice will create will then be one for each CATI contact record that exists in the answer sheet -- and one record for each answer sheet that exists in the questionnaire.

The columns that belong to the CATI contacts and answer sheet info are:

Answer sheet columns

CATI contact columns

Below is a small example, where we choose to make a resource cache with just ID of one questionnaire resource.

RCS58-8

As you will notice, the addition of one questionnaire will create one row in our resource cache, since we have not added any answer sheet or CATI contact columns.

Now let us try to add the 'Answer sheet Id' (from answer sheet generating the ResourceProjectQuestionnaireId column) and 'CATI contact Id' (from CATI contact generating CatiContactId column) columns and see what will happen.

RCS58-9

Now, with the same number of included resources, we have 14 rows rather than only one as before. The reason is that it needs to show information from 13 answer sheets that exist in it; and for each answer sheet it needs to show anywhere between 0 and 2 CATI contact records depending on how many CATI calls where made in regards to the answer sheet (as you can see it was only for answer sheet with id 6532 and 6527 that CATI calls were made -- 6527 had 2 calls done for it).

It is therefore important to understand which data relates to answer sheet and CATI contact columns and which relate to the questionnaire. CATI contact columns will always only be shown once in a resource cache, whereas answer sheets and questionnaires may be shown multiple times if the questionnaire has more than one of each.


Pages in category "Resource data caches"

The following 141 pages are in this category, out of 141 total.

C