# Custom Class Optimization?

**URL:** <https://forum.kirupa.com/t/custom-class-optimization/225193>\
**Category:** flash\
**Created:** [May 9, 2007, 4:19pm UTC](https://forum.kirupa.com/t/custom-class-optimization/225193 "2007-05-09T16:19:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chemcnabb](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chemcnabb/32/3600_2.png) [@chemcnabb](https://forum.kirupa.com/u/chemcnabb)\
**Post date:** [May 9, 2007, 4:19pm UTC](https://forum.kirupa.com/t/custom-class-optimization/225193/1 "2007-05-09T16:19:23Z")

</div>

Hey all,

I was wondering if anyone could help me or point me in the direction of some actionscript cacheing techniques. I have a series of custom classes that I’ve built that model a database. I’m currently using this approach:  
Database-\>php classes-\>dynamic XML (based on ID)-\>Actionscript Class-\>Flash.  
The problem is I am pinging the server for every query to the db, and since I have many classes, the end result is rather slow. I know there are ways of creating an object cache - adding my objects into an array then checking the array for the object before re-querying the server, I just don’t offhand know the proper technique for doing this, since I wouldn’t know which index in the array to access…

Hopefully I’m not being too confusing, but I could really use some help…
