def get_posts(self, offset=0, limit=1000, order=None, filters=None):
        """ This method returns list of Posts for this Data Source starting at a given offset and not more than limit
        It will call content-specific methods:
             _format() to format output from the DataStore
        """
        order = self._get_order(order)
        cache_key = self.get_cache_key(offset, limit, order, filters)
        content = cache.get(cache_key)
#        if content:
#            return content
        try:
            if self.up_to_date():
                pass # not time to update yet
            else:
                self.update()
        except:
            raise
            pass # query the database for now and update later
        query = self._get_query(order=order, filters=filters)
        posts = query[int(offset):int(offset)+int(limit)]
        posts = self._format(posts)
        cache_duration = conf.GOSCALE_CACHE_DURATION if posts else 1
        cache.set(cache_key, posts, cache_duration)
        return posts
def get_posts ( self , offset = 0 , limit = 1000 , order = None , filters = None ) : order = self . _get_order ( order ) cache_key = self . get_cache_key ( offset , limit , order , filters ) content = cache . get ( cache_key ) try : if self . up_to_date ( ) : pass else : self . update ( ) except : raise pass query = self . _get_query ( order = order , filters = filters ) posts = query [ int ( offset ) : int ( offset ) + int ( limit ) ] posts = self . _format ( posts ) cache_duration = conf . GOSCALE_CACHE_DURATION if posts else 1 cache . set ( cache_key , posts , cache_duration ) return posts
This method returns list of Posts for this Data Source starting at a given offset and not more than limit
        It will call content-specific methods:
             _format() to format output from the DataStore