EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ObjCacheService.cpp
Go to the documentation of this file.
1 /*
2  ------------------------------------------------------------------------------------
3  LICENSE:
4  ------------------------------------------------------------------------------------
5  This file is part of EVEmu: EVE Online Server Emulator
6  Copyright 2006 - 2021 The EVEmu Team
7  For the latest information visit https://evemu.dev
8  ------------------------------------------------------------------------------------
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU Lesser General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13 
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public License along with
19  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20  Place - Suite 330, Boston, MA 02111-1307, USA, or go to
21  http://www.gnu.org/copyleft/lesser.txt.
22  ------------------------------------------------------------------------------------
23  Author: Zhur
24 */
25 
31 #include "eve-server.h"
32 
33 #include "PyServiceCD.h"
34 #include "cache/ObjCacheService.h"
35 
36 const char *const ObjCacheService::LoginCachableObjects[] = {
37  "config.BulkData.paperdollResources",
38  "config.BulkData.ramactivities",
39  "config.BulkData.billtypes",
40  "config.BulkData.bloodlineNames",
41  "config.BulkData.locationscenes",
42  "config.BulkData.overviewDefaults",
43  "config.BulkData.schematicspinmap",
44  "config.Bloodlines",
45  "config.BulkData.overviewDefaultGroups",
46  "config.BulkData.schematics",
47  "config.BulkData.paperdollColors",
48  "config.BulkData.schematicstypemap",
49  "config.BulkData.sounds",
50  "config.BulkData.invtypematerials",
51  "config.BulkData.ownericons",
52  "config.BulkData.paperdollModifierLocations",
53  "config.BulkData.paperdollSculptingLocations",
54  "config.BulkData.paperdollColorNames",
55  "config.BulkData.paperdollColorRestrictions",
56  "config.BulkData.icons",
57  "config.Units",
58  "config.BulkData.tickernames",
59  "config.BulkData.ramtyperequirements",
60  "config.BulkData.ramaltypesdetailpergroup",
61  "config.BulkData.ramaltypes",
62  "config.BulkData.allianceshortnames",
63  "config.BulkData.ramcompletedstatuses",
64  "config.BulkData.categories",
65  "config.BulkData.invtypereactions",
66  "config.BulkData.dgmtypeeffects",
67  "config.BulkData.metagroups",
68  "config.BulkData.ramaltypesdetailpercategory",
69  "config.BulkData.owners",
70  "config.StaticOwners",
71  "config.Races",
72  "config.Attributes",
73  "config.BulkData.dgmtypeattribs",
74  "config.BulkData.locations",
75  "config.BulkData.locationwormholeclasses",
76  "config.BulkData.groups",
77  "config.BulkData.shiptypes",
78  "config.BulkData.dgmattribs",
79  "config.Flags",
80  "config.BulkData.bptypes",
81  "config.BulkData.graphics",
82  "config.BulkData.mapcelestialdescriptions",
83  "config.BulkData.certificates",
84  "config.StaticLocations",
85  "config.InvContrabandTypes",
86  "config.BulkData.certificaterelationships",
87  "config.BulkData.units",
88  "config.BulkData.dgmeffects",
89  "config.BulkData.dgmexpressions",
90  "config.BulkData.types",
91  "config.BulkData.invmetatypes"
92 };
94 
95 const char *const ObjCacheService::CharCreateCachableObjects[] = {
96  "charCreationInfo.bl_eyebrows",
97  "charCreationInfo.bl_eyes",
98  "charCreationInfo.bl_decos",
99  "charCreationInfo.bloodlines",
100  "charCreationInfo.bl_hairs",
101  "charCreationInfo.bl_backgrounds",
102  "charCreationInfo.bl_accessories",
103  "charCreationInfo.bl_costumes",
104  "charCreationInfo.bl_lights",
105  "charCreationInfo.races",
106  "charCreationInfo.ancestries",
107  "charCreationInfo.schools",
108  "charCreationInfo.attributes",
109  "charCreationInfo.bl_beards",
110  "charCreationInfo.bl_skins",
111  "charCreationInfo.bl_lipsticks",
112  "charCreationInfo.bl_makeups"
113 };
115 
116 const char *const ObjCacheService::AppearanceCachableObjects[] = {
117  "charCreationInfo.eyebrows",
118  "charCreationInfo.eyes",
119  "charCreationInfo.decos",
120  "charCreationInfo.hairs",
121  "charCreationInfo.backgrounds",
122  "charCreationInfo.accessories",
123  "charCreationInfo.costumes",
124  "charCreationInfo.lights",
125  "charCreationInfo.makeups",
126  "charCreationInfo.beards",
127  "charCreationInfo.skins",
128  "charCreationInfo.lipsticks"
129 };
131 
133  "charNewExtraCreationInfo.raceskills",
134  "charNewExtraCreationInfo.careerskills",
135  "charNewExtraCreationInfo.careers",
136  "charNewExtraCreationInfo.specialityskills",
137  "charNewExtraCreationInfo.specialities"
138 };
140 
142 
143 ObjCacheService::ObjCacheService(PyServiceMgr *mgr, const char *cacheDir)
144 : PyService(mgr, "objectCaching"),
145  m_dispatch(new Dispatcher(this)),
146  m_cacheDir(cacheDir)
147 {
148  std::string _basePath = sConfig.files.cacheDir;
149  if (_basePath[_basePath.size() - 1] != '/')
150  _basePath += "/";
151  CreateDirectory(_basePath.c_str(), nullptr);
152 
153  _SetCallDispatcher(m_dispatch);
154 
155  PyCallable_REG_CALL(ObjCacheService, GetCachableObject);
156 
157  //register full name -> short key in m_cacheKeys
158  m_cacheKeys["config.BulkData.paperdollResources"] = "config.BulkData.paperdollResources";
159  m_cacheKeys["config.BulkData.bloodlineNames"] = "config.BulkData.bloodlineNames";
160  m_cacheKeys["config.BulkData.locationscenes"] = "config.BulkData.locationscenes";
161  m_cacheKeys["config.BulkData.overviewDefaults"] = "config.BulkData.overviewDefaults";
162  m_cacheKeys["config.BulkData.schematicspinmap"] = "config.BulkData.schematicspinmap";
163  m_cacheKeys["config.BulkData.overviewDefaultGroups"] = "config.BulkData.overviewDefaultGroups";
164  m_cacheKeys["config.BulkData.schematics"] = "config.BulkData.schematics";
165  m_cacheKeys["config.BulkData.paperdollColors"] = "config.BulkData.paperdollColors";
166  m_cacheKeys["config.BulkData.schematicstypemap"] = "config.BulkData.schematicstypemap";
167  m_cacheKeys["config.BulkData.sounds"] = "config.BulkData.sounds";
168  m_cacheKeys["config.BulkData.invtypematerials"] = "config.BulkData.invtypematerials";
169  m_cacheKeys["config.BulkData.ownericons"] = "config.BulkData.ownericons";
170  m_cacheKeys["config.BulkData.paperdollModifierLocations"] = "config.BulkData.paperdollModifierLocations";
171  m_cacheKeys["config.BulkData.paperdollSculptingLocations"] = "config.BulkData.paperdollSculptingLocations";
172  m_cacheKeys["config.BulkData.paperdollColorNames"] = "config.BulkData.paperdollColorNames";
173  m_cacheKeys["config.BulkData.paperdollColorRestrictions"] = "config.BulkData.paperdollColorRestrictions";
174  m_cacheKeys["config.BulkData.icons"] = "config.BulkData.icons";
175  m_cacheKeys["config.BulkData.billtypes"] = "config.BulkData.billtypes";
176  m_cacheKeys["config.BulkData.allianceshortnames"] = "config.BulkData.allianceshortnames";
177  m_cacheKeys["config.BulkData.categories"] = "config.BulkData.categories";
178  m_cacheKeys["config.BulkData.invtypereactions"] = "config.BulkData.invtypereactions";
179  m_cacheKeys["config.BulkData.dgmexpressions"] = "config.BulkData.dgmexpressions";
180  m_cacheKeys["config.BulkData.dgmtypeattribs"] = "config.BulkData.dgmtypeattribs";
181  m_cacheKeys["config.BulkData.dgmtypeeffects"] = "config.BulkData.dgmtypeeffects";
182  m_cacheKeys["config.BulkData.dgmeffects"] = "config.BulkData.dgmeffects";
183  m_cacheKeys["config.BulkData.dgmattribs"] = "config.BulkData.dgmattribs";
184  m_cacheKeys["config.BulkData.metagroups"] = "config.BulkData.metagroups";
185  m_cacheKeys["config.BulkData.ramactivities"] = "config.BulkData.ramactivities";
186  m_cacheKeys["config.BulkData.ramaltypesdetailpergroup"] = "config.BulkData.ramaltypesdetailpergroup";
187  m_cacheKeys["config.BulkData.ramaltypesdetailpercategory"] = "config.BulkData.ramaltypesdetailpercategory";
188  m_cacheKeys["config.BulkData.ramaltypes"] = "config.BulkData.ramaltypes";
189  m_cacheKeys["config.BulkData.ramcompletedstatuses"] = "config.BulkData.ramcompletedstatuses";
190  m_cacheKeys["config.BulkData.ramtyperequirements"] = "config.BulkData.ramtyperequirements";
191  m_cacheKeys["config.BulkData.mapcelestialdescriptions"] = "config.BulkData.mapcelestialdescriptions";
192  m_cacheKeys["config.BulkData.tickernames"] = "config.BulkData.tickernames";
193  m_cacheKeys["config.BulkData.groups"] = "config.BulkData.groups";
194  m_cacheKeys["config.BulkData.certificates"] = "config.BulkData.certificates";
195  m_cacheKeys["config.BulkData.certificaterelationships"] = "config.BulkData.certificaterelationships";
196  m_cacheKeys["config.BulkData.shiptypes"] = "config.BulkData.shiptypes";
197  m_cacheKeys["config.BulkData.locations"] = "config.BulkData.locations";
198  m_cacheKeys["config.BulkData.locationwormholeclasses"] = "config.BulkData.locationwormholeclasses";
199  m_cacheKeys["config.BulkData.bptypes"] = "config.BulkData.bptypes";
200  m_cacheKeys["config.BulkData.graphics"] = "config.BulkData.graphics";
201  m_cacheKeys["config.BulkData.types"] = "config.BulkData.types";
202  m_cacheKeys["config.BulkData.invmetatypes"] = "config.BulkData.invmetatypes";
203  m_cacheKeys["config.Bloodlines"] = "config.Bloodlines";
204  m_cacheKeys["config.Units"] = "config.Units";
205  m_cacheKeys["config.BulkData.units"] = "config.BulkData.units";
206  m_cacheKeys["config.BulkData.owners"] = "config.BulkData.owners";
207  m_cacheKeys["config.StaticOwners"] = "config.StaticOwners";
208  m_cacheKeys["config.Races"] = "config.Races";
209  m_cacheKeys["config.Attributes"] = "config.Attributes";
210  m_cacheKeys["config.Flags"] = "config.Flags";
211  m_cacheKeys["config.StaticLocations"] = "config.StaticLocations";
212  m_cacheKeys["config.InvContrabandTypes"] = "config.InvContrabandTypes";
213 
214  m_cacheKeys["charCreationInfo.bloodlines"] = "bloodlines";
215  m_cacheKeys["charCreationInfo.races"] = "races";
216  m_cacheKeys["charCreationInfo.ancestries"] = "ancestries";
217  m_cacheKeys["charCreationInfo.schools"] = "schools";
218  m_cacheKeys["charCreationInfo.attributes"] = "attributes";
219  m_cacheKeys["charCreationInfo.bl_accessories"] = "accessories";
220  m_cacheKeys["charCreationInfo.bl_lights"] = "lights";
221  m_cacheKeys["charCreationInfo.bl_skins"] = "skins";
222  m_cacheKeys["charCreationInfo.bl_beards"] = "beards";
223  m_cacheKeys["charCreationInfo.bl_eyes"] = "eyes";
224  m_cacheKeys["charCreationInfo.bl_lipsticks"] = "lipsticks";
225  m_cacheKeys["charCreationInfo.bl_makeups"] = "makeups";
226  m_cacheKeys["charCreationInfo.bl_hairs"] = "hairs";
227  m_cacheKeys["charCreationInfo.bl_backgrounds"] = "backgrounds";
228  m_cacheKeys["charCreationInfo.bl_decos"] = "decos";
229  m_cacheKeys["charCreationInfo.bl_eyebrows"] = "eyebrows";
230  m_cacheKeys["charCreationInfo.bl_costumes"] = "costumes";
231 
232  m_cacheKeys["charCreationInfo.eyebrows"] = "eyebrows";
233  m_cacheKeys["charCreationInfo.eyes"] = "eyes";
234  m_cacheKeys["charCreationInfo.decos"] = "decos";
235  m_cacheKeys["charCreationInfo.hairs"] = "hairs";
236  m_cacheKeys["charCreationInfo.backgrounds"] = "backgrounds";
237  m_cacheKeys["charCreationInfo.accessories"] = "accessories";
238  m_cacheKeys["charCreationInfo.lights"] = "lights";
239  m_cacheKeys["charCreationInfo.costumes"] = "costumes";
240  m_cacheKeys["charCreationInfo.makeups"] = "makeups";
241  m_cacheKeys["charCreationInfo.beards"] = "beards";
242  m_cacheKeys["charCreationInfo.skins"] = "skins";
243  m_cacheKeys["charCreationInfo.lipsticks"] = "lipsticks";
244 
245  m_cacheKeys["charNewExtraCreationInfo.raceskills"] = "raceskills";
246  m_cacheKeys["charNewExtraCreationInfo.careerskills"] = "careerskills";
247  m_cacheKeys["charNewExtraCreationInfo.careers"] = "careers";
248  m_cacheKeys["charNewExtraCreationInfo.specialityskills"] = "specialityskills";
249  m_cacheKeys["charNewExtraCreationInfo.specialities"] = "specialities";
250 }
251 
253  delete m_dispatch;
254 }
255 
256 PyResult ObjCacheService::Handle_GetCachableObject(PyCallArgs &call) {
257  /*
258 20:27:48 L ObjCacheService: Handle_GetCachableObject
259 20:27:48 [SvcCall] Call Arguments:
260 20:27:48 [SvcCall] Tuple: 4 elements
261 20:27:48 [SvcCall] [ 0] Boolean field: false
262 20:27:48 [SvcCall] [ 1] Tuple: 3 elements
263 20:27:48 [SvcCall] [ 1] [ 0] String: 'Method Call'
264 20:27:48 [SvcCall] [ 1] [ 1] String: 'server'
265 20:27:48 [SvcCall] [ 1] [ 2] Tuple: 2 elements
266 20:27:48 [SvcCall] [ 1] [ 2] [ 0] String: 'marketProxy'
267 20:27:48 [SvcCall] [ 1] [ 2] [ 1] String: 'GetMarketGroups'
268 20:27:48 [SvcCall] [ 2] Tuple: 2 elements
269 20:27:48 [SvcCall] [ 2] [ 0] Integer field: 130418403480000000
270 20:27:48 [SvcCall] [ 2] [ 1] Integer field: 933884788
271 20:27:48 [SvcCall] [ 3] Integer field: 333444
272  */
273  //sLog.White( "ObjCacheService", "Handle_GetCachableObject" );
274  //call.Dump(SERVICE__CALL_DUMP);
275  CallGetCachableObject args;
276  if (!args.Decode(&call.tuple)) {
277  codelog(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
278  return nullptr;
279  }
280 
281  if(!_LoadCachableObject(args.objectID))
282  return nullptr; //print done already
283 
284  //should we check their version? I am pretty sure they check it and only request what they want.
285  //well, we want to do something like this, but this doesn't seem to be it. taken
286  // out until we have time to figure out how to properly throw the CacheOK exception.
287  /*if(m_cache.IsCacheUpToDate(args.objectID, args.version, args.timestamp)) {
288  //they throw an exception for "its up to date", lets give it a try...
289  return new CacheOK();
290  }
291  */
292 
293  PyObject *result = m_cache.GetCachedObject(args.objectID);
294 
295  return result;
296 }
297 
299 {
300  CacheKeysMapConstItr cur = m_cacheKeys.begin();
301  for(; cur != m_cacheKeys.end(); cur++)
302  {
303  PyString* str = new PyString( cur->first );
304  _LoadCachableObject( str );
305  PyDecRef( str );
306  }
307 }
308 
309 PySubStream* ObjCacheService::LoadCachedFile(const char *filename, const char *oname)
310 {
311  //temp hack...
312  return m_cache.LoadCachedFile( filename, oname );
313 }
314 
315 
317  if(m_cache.HaveCached(objectID))
318  return true;
319 
320  const std::string objectID_string = CachedObjectMgr::OIDToString(objectID);
321 
322  if(!m_cacheDir.empty())
323  {
324  if( m_cache.LoadCachedFromFile( m_cacheDir, objectID ) )
325  {
326  _log( CACHE__INFO, "Loaded cached object '%s' from file.", objectID_string.c_str() );
327  return true;
328  }
329  }
330 
331  //first try to generate it from the database...
332  //we go to the DB with a string, not a rep
333  PyRep *cache = m_db.GetCachableObject(objectID_string);
334  if(cache != nullptr) {
335  //we have generated the cache file in question, remember it
336  m_cache.UpdateCache(objectID, &cache);
337  } else {
338  //failed to query from the database... fall back to old
339  //hackish file loading.
340  PySubStream* ss = m_cache.LoadCachedFile( objectID_string.c_str() );
341  if( ss == nullptr )
342  {
343  _log(CACHE__ERROR, "Failed to create or load cache file for '%s'", objectID_string.c_str());
344  return false;
345  }
346 
347  //we have generated the cache file in question, remember it
348  m_cache.UpdateCacheFromSS(objectID_string, &ss);
349  }
350 
351  //if we have a cache dir, write out the cache entry:
352  if(!m_cacheDir.empty())
353  {
354  if(!m_cache.SaveCachedToFile(m_cacheDir, objectID)) {
355  sLog.Error( "ObjCacheService", "Failed to save cache file for '%s' in '%s'", objectID_string.c_str(), m_cacheDir.c_str() );
356  } else {
357  sLog.White( "ObjCacheService", "Saved cached object '%s' to file in '%s'.", objectID_string.c_str(), m_cacheDir.c_str() );
358  }
359  }
360 
361  return true;
362 }
363 
365  if (!_LoadCachableObject(objectID))
366  return nullptr; //print done already
367 
368  PyObject *cache_hint = m_cache.MakeCacheHint(objectID);
369  if (cache_hint == nullptr) {
370  _log(CACHE__ERROR, "Unable to build cache hint for object ID '%s' (h), skipping.", CachedObjectMgr::OIDToString(objectID).c_str());
371  return nullptr;
372  }
373 
374  return cache_hint;
375 }
376 
378  const char *const *objects = nullptr;
379  uint32 object_count = 0;
380  switch(hset) {
381  case hLoginCachables:
382  objects = LoginCachableObjects;
383  object_count = LoginCachableObjectCount;
384  break;
386  objects = CharCreateCachableObjects;
387  object_count = CharCreateCachableObjectCount;
388  break;
390  objects = AppearanceCachableObjects;
391  object_count = AppearanceCachableObjectCount;
392  break;
396  break;
397  }
398  if(objects == nullptr)
399  return;
400  uint32 r;
401  std::map<std::string, std::string>::const_iterator res;
402  for(r = 0; r < object_count; r++) {
403  //find the dict key to use for this object
404  res = m_cacheKeys.find(objects[r]);
405  if(res == m_cacheKeys.end()) {
406  _log(CACHE__ERROR, "Unable to find cache key for object ID '%s', skipping.", objects[r]);
407  continue;
408  }
409 
410  //get the hint
411  PyString* str = new PyString( objects[r] );
412  PyRep *cache_hint = GetCacheHint( str );
413  PyDecRef( str );
414 
415  if(cache_hint == nullptr)
416  continue; //print already done.
417 
418  into->SetItemString(res->second.c_str(), cache_hint);
419  }
420 }
421 
422 bool ObjCacheService::IsCacheLoaded(const PyRep *objectID) const {
423  return(m_cache.HaveCached(objectID));
424 }
425 
427  m_cache.InvalidateCache(objectID);
428 }
429 
430 void ObjCacheService::GiveCache(const PyRep *objectID, PyRep **contents) {
431  //contents is consumed.
432  m_cache.UpdateCache(objectID, contents);
433 }
434 
435 PyObject *ObjCacheService::MakeObjectCachedSessionMethodCallResult(const PyRep *objectID, const char *sessionInfoName, const char *clientWhen) {
436  if(!IsCacheLoaded(objectID))
437  return nullptr;
438 
439  objectCaching_SessionCachedMethodCallResult_object c;
440  c.clientWhen = clientWhen;
441  c.sessionInfoName = sessionInfoName;
442  c.object = m_cache.MakeCacheHint(objectID);
443  return c.Encode();
444 }
445 
446 PyObject *ObjCacheService::MakeObjectCachedMethodCallResult(const PyRep *objectID, const char *versionCheck) {
447  if(!IsCacheLoaded(objectID))
448  return nullptr;
449 
450  objectCaching_CachedMethodCallResult_object c;
451  c.versionCheck = versionCheck;
452  c.object = m_cache.MakeCacheHint(objectID);
453  return c.Encode();
454 }
455 
456 ObjectCachedMethodID::ObjectCachedMethodID(const char *service, const char *method)
457 {
458  MethodCallID c;
459  c.service = service;
460  c.method = method;
461  objectID = c.Encode();
462 }
463 
465 {
466  PyDecRef( objectID );
467 }
468 
469 ObjectCachedSessionMethodID::ObjectCachedSessionMethodID(const char *service, const char *method, int32 sessionValue)
470 {
471  SessionMethodCallID c;
472  c.service = service;
473  c.method = method;
474  /*
475  HACK:
476  charID but can also be corpID or other values need to make dynamic
477  and also need to be able to update the "sessionInfo" kvp so that it knows what the field is.
478  */
479  c.sessionValue = sessionValue;
480  objectID = c.Encode();
481 }
482 
484 {
485  PyDecRef( objectID );
486 }
Base Python wire object.
Definition: PyRep.h:66
#define sConfig
A macro for easier access to the singleton.
Dispatcher *const m_dispatch
std::string m_cacheDir
bool HaveCached(const std::string &objectID) const
#define _log(type, fmt,...)
Definition: logsys.h:124
void InsertCacheHints(hintSet hset, PyDict *into)
Python string.
Definition: PyRep.h:430
Python's dictionary.
Definition: PyRep.h:719
static const uint32 CharCreateNewExtraCachableObjectCount
bool _LoadCachableObject(const PyRep *objectID)
PyObject * MakeCacheHint(const PyRep *objectID)
PyRep * GetCacheHint(const PyRep *objectID)
const char * GetName() const
Definition: PyService.h:54
PySubStream * LoadCachedFile(const char *filename, const char *oname)
void UpdateCache(const std::string &objectID, PyRep **in_cached_data)
signed __int32 int32
Definition: eve-compat.h:49
* args
#define sLog
Evaluates to a NewLog instance.
Definition: LogNew.h:250
Python object.
Definition: PyRep.h:826
static const char *const AppearanceCachableObjects[]
PySubStream * LoadCachedFile(const char *obj_name)
int CreateDirectory(const char *name, void *)
Definition: eve-compat.cpp:46
bool SaveCachedToFile(const std::string &cacheDir, const std::string &objectID) const
void UpdateCacheFromSS(const std::string &objectID, PySubStream **in_cached_data)
#define codelog(type, fmt,...)
Definition: logsys.h:128
entityID heal the character with the entityID note giving you detailed ship status information gives a list of all dynamic entities and players and their destinyState in this bubble shows some current destiny variables save all kick all and halt server immediate command list all items in current location s gives list of cargo contents and volumes in all holds list current session values show current ship DNA show current objects in their destiny and movement speed show current attributes for itemID given in args note giving you detailed fleet boost information gets positional data between ship and enable disable bubble outline tracking shows all dynamic items in system on ship scanner begin warp to given bubbleID in current ship list of current bound objects(with clients)." ) COMMAND( dropLoot
static const uint32 AppearanceCachableObjectCount
CachedObjectMgr m_cache
void InvalidateCache(const PyRep *objectID)
static const uint32 CharCreateCachableObjectCount
virtual ~ObjCacheService()
PyCallable_Make_InnerDispatcher(ObjCacheService) ObjCacheService
static const uint32 LoginCachableObjectCount
#define PyDecRef(op)
Definition: PyRep.h:57
#define PyCallable_REG_CALL(c, m)
Definition: PyServiceCD.h:78
static const char *const LoginCachableObjects[]
unsigned __int32 uint32
Definition: eve-compat.h:50
static const char *const CharCreateCachableObjects[]
void InvalidateCache(const PyRep *objectID)
CacheKeysMap::const_iterator CacheKeysMapConstItr
void GiveCache(const PyRep *objectID, PyRep **contents)
static std::string OIDToString(const PyRep *objectID)
static const char *const CharCreateNewExtraCachableObjects[]
ObjectCachedSessionMethodID(const char *service, const char *method, int32 sessionValue)
PyObject * GetCachedObject(const PyRep *objectID)
Dispatcher *const m_dispatch
PyObject * MakeObjectCachedSessionMethodCallResult(const PyRep *objectID, const char *sessionInfoName, const char *clientWhen="always")
CacheKeysMap m_cacheKeys
PyObject * MakeObjectCachedMethodCallResult(const PyRep *objectID, const char *versionCheck="run")
bool LoadCachedFromFile(const std::string &cacheDir, const std::string &objectID)
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
Definition: PyRep.h:812
ObjectCachedMethodID(const char *service, const char *method)
bool IsCacheLoaded(const PyRep *objectID) const
PyRep * GetCachableObject(const std::string &type)
Definition: ObjCacheDB.cpp:132
PyTuple * tuple
Definition: PyCallable.h:50