Difference between revisions of "API:EPrints/DataObj/Cachemap"
Line 18: | Line 18: | ||
==DESCRIPTION== | ==DESCRIPTION== | ||
This is an internal class that shouldn't be used outside [[API:EPrints/Database|EPrints::Database]]. | This is an internal class that shouldn't be used outside [[API:EPrints/Database|EPrints::Database]]. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_instance_variables --> | ||
+ | ==INSTANCE VARIABLES== | ||
+ | See [[API:EPrints/DataObj#INSTANCE_VARIABLES|EPrints::DataObj#INSTANCE_VARIABLES]]. | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 109: | Line 120: | ||
<!-- Pod2Wiki=head_methods --> | <!-- Pod2Wiki=head_methods --> | ||
==METHODS== | ==METHODS== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_constructor_methods --> | ||
+ | ===Constructor Methods=== | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
<span style='display:none'>User Comments</span> | <span style='display:none'>User Comments</span> | ||
Line 117: | Line 137: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_create_from_data --> | <!-- Pod2Wiki=item_create_from_data --> | ||
− | ===create_from_data=== | + | ====create_from_data==== |
EPrints::DataObj::Cachemap->create_from_data( $session, $data, $dataset ) | EPrints::DataObj::Cachemap->create_from_data( $session, $data, $dataset ) | ||
Line 139: | Line 159: | ||
<!-- Pod2Wiki= --> | <!-- Pod2Wiki= --> | ||
</div> | </div> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki=head_class_methods --> |
− | === | + | ===Class Methods=== |
− | |||
− | |||
− | |||
− | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
<span style='display:none'>User Comments</span> | <span style='display:none'>User Comments</span> | ||
Line 152: | Line 168: | ||
<!-- Pod2Wiki= --> | <!-- Pod2Wiki= --> | ||
</div> | </div> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki=item_get_system_field_info --> |
− | === | + | ====get_system_field_info==== |
+ | |||
+ | $fields = EPrints::DataObj::Access->get_system_field_info | ||
+ | Returns an array describing the system metadata of the cachemap dataset. | ||
+ | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
<span style='display:none'>User Comments</span> | <span style='display:none'>User Comments</span> | ||
Line 165: | Line 185: | ||
$dataset = EPrints::DataObj::Cachemap->get_dataset_id | $dataset = EPrints::DataObj::Cachemap->get_dataset_id | ||
− | Returns the | + | Returns the ID of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs. |
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 190: | Line 210: | ||
====cleanup==== | ====cleanup==== | ||
− | $dropped = EPrints::DataObj::Cachemap->cleanup( $ | + | $dropped = EPrints::DataObj::Cachemap->cleanup( $repo ) |
− | Clean up old caches for specified <tt>$ | + | Clean up old caches for specified <tt>$repo</tt>. |
Returns the number of caches dropped. | Returns the number of caches dropped. |
Revision as of 22:37, 1 January 2022
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
NAME
EPrints::DataObj::Cachemap - Cache tables
DESCRIPTION
This is an internal class that shouldn't be used outside EPrints::Database.
INSTANCE VARIABLES
See EPrints::DataObj#INSTANCE_VARIABLES.
CORE METADATA FIELDS
cachemapid (int)
The unique numerical ID of this cachemap object.
created (int)
The time the cachemap record was created in seconds since start of last epoch.
lastused (int)
The time the cachemap record was last used in seconds since start of last epoch.
userid (itemref)
Reference to the userid of the user who caused the cachemap record to be created, if this is known.
searchexap (longtext)
A serialisation of the search carried out that is stored in this cachemap record.
oneshot (boolean)
DEPRECATED. A boolean to record whether the cache is for single use where it will be created, used and immediately deleted. Such as type of caching is no longer required.
METHODS
Constructor Methods
create_from_data
EPrints::DataObj::Cachemap->create_from_data( $session, $data, $dataset )
Creates a new cachemap data object in the database.
$dataset is the dataset it will belong to.
$data is the data structured as with EPrints::DataObj#new_from_data.
This will create sub-objects as well.
Call this via:
$dataset->create_object( $session, $data )
Class Methods
get_system_field_info
$fields = EPrints::DataObj::Access->get_system_field_info
Returns an array describing the system metadata of the cachemap dataset.
get_dataset_id
$dataset = EPrints::DataObj::Cachemap->get_dataset_id
Returns the ID of the EPrints::DataSet object to which this record belongs.
get_defaults
$defaults = EPrints::DataObj::Cachemap->get_defaults( $session, $data )
Return default values for this object based on the starting $data.
cleanup
$dropped = EPrints::DataObj::Cachemap->cleanup( $repo )
Clean up old caches for specified $repo.
Returns the number of caches dropped.
Object Methods
remove
$rc = $cachemap->remove
Remove this record from the data set and the cache table from the database.
Returns a code based of success of removing record / cache table.
get_sql_table_name
$sql_name = $cachemap->get_sql_table_name
Returns the name of the cache table for this cachemap record.
create_sql_table
$ok = $cachemap->create_sql_table( $dataset )
Create the cachemap database table that can store IDs for the specified $dataset.
Returns code based on the success of creating cache table.
SEE ALSO
EPrints::DataObj and EPrints::DataSet.
COPYRIGHT
© Copyright 2000-2024 University of Southampton.
EPrints 3.4 is supplied by EPrints Services.
http://www.eprints.org/eprints-3.4/
LICENSE
This file is part of EPrints 3.4 http://www.eprints.org/.
EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.
EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.