
Public Member Functions | |
| updateAllResourceCaches () | |
| Update all resource caches for all cserd id's. | |
| updateResourceCacheHelper ($mixed) | |
| Update the cache for this resource in the SDRResourceCache table. | |
| updateResourceVersionCaches ($resource, $version) | |
| INSERT BRIEF DESCRIPTION HERE. | |
| updateSearchWordCache ($version) | |
| Update the quick search word count cache for this resource, using this version. | |
Static Public Member Functions | |
| static | deleteResourceCache ($cserdId) |
| Delete the resource cache for a numeric cserdId. | |
| static | deleteSearchCaches ($cserdId) |
| Delete both the resource cache and the search word cache for a cserdId. | |
| static | deleteSearchWordCache ($cserdId) |
| Delete the search word cache for a numeric cserdId. | |
| static | updateAllCaches () |
| Update all caches for all cserd id's (resource and value caches). | |
| static | updateAverageReviewRating ($cserdId) |
| Update the average review rating for an item in SDR. | |
| static | updateResourceCache ($identifier) |
| Update all caches for this identifier. If there are no approved versions of the metadata, delete the cache stored for the item. | |
| static | updateValueCache () |
| Update the value cache. | |
Definition at line 6 of file SDRServiceCache.php5.
| static SDRServiceCache::updateAverageReviewRating | ( | $ | cserdId | ) | [static] |
Update the average review rating for an item in SDR.
Connect to the CSERD database and average the responses for the "usability" question among published reviews. Then take this value, connect to the SDR database, and update the resource record and cache for the given cserdId using that average value.
XXXTodo: Group by user so that one user can't have extra sway on the rating
| $cserdId | [int]: The cserdId to update |
Definition at line 284 of file SDRServiceCache.php5.
References SDR::getDBI(), CSERD::getDBI(), and SObject::hasError().
| SDRServiceCache::updateResourceCacheHelper | ( | $ | mixed | ) |
Update the cache for this resource in the SDRResourceCache table.
Use information from this resource object and its SDRMetadataObj object to insert a cache of values and metadata XML. If there is no live version, remove any existing cache for this resource from the table.
Definition at line 182 of file SDRServiceCache.php5.
References SDRService::getDBI(), SDRVersion::getList(), and SDRService::getResource().
Referenced by SDRService::submit(), and SDRService::updateReleaseFlag().
| SDRServiceCache::updateResourceVersionCaches | ( | $ | resource, | |
| $ | version | |||
| ) |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
| $resource | [TYPE]: DESCRIPTION | |
| $version | [TYPE]: DESCRIPTION |
Definition at line 364 of file SDRServiceCache.php5.
Referenced by SDRService::approve(), and SDRService::reject().
| SDRServiceCache::updateSearchWordCache | ( | $ | version | ) |
Update the quick search word count cache for this resource, using this version.
Insert the (relevant) words found in all metadata values in this version into SDRSearchWord and insert rows into SDRSearchWordCount matching the following: the search words, the number of times they occur, this resource, and the fields to which the words apply. The two caching tables can be used by SDR's quick find engine to do a quick relevance search on a set of keywords.
Definition at line 88 of file SDRServiceCache.php5.
References SDRService::getDBI(), and SDRVersionFieldValue::getList().
1.5.6