Creates node to hold data in cache
966822
public boolean create() {
		if (!exists()) {
			node = mobicentsCache.getJBossCache().getRoot().addChild(nodeFqn);
			if (doTraceLogs) {
				logger.trace("created cache node "+nodeFqn);
			}
			return true;
		}
		else {
			return false;
		}
	}
905506
private synchronized void loadExistingData() {
        for (ChildData childData : _pathCache.getCurrentData()) {
            addNode(childData.getPath(), parseChildData(childData));
        }
    }
142298
function PersistOutNode(n) {
        RED.nodes.createNode(this,n);
        var node = this;

        node.name = n.name;
        node.storageNode = RED.nodes.getNode(n.storageNode);

        node.restore = function() {
            var msg = node.storageNode.getMessage(node.name);
            node.send(msg);
        };


        RED.events.on("nodes-started", node.restore);

        node.on("input", function(msg) {
            node.restore();
        });

        node.on('close', function(removed, done) {
            RED.events.removeListener("nodes-started", node.restore);
            done();
        });
    }
640135
function createLNodeObject(type, currentView, parent, native, state, queries) {
    return {
        native: native,
        view: currentView,
        nodeInjector: parent ? parent.nodeInjector : null,
        data: state,
        queries: queries,
        tNode: null,
        dynamicLContainerNode: null
    };
}
259579
def store_iter(self, key, content):
        ''''''
        cachekey = self.xform_key(key)
        path = self.path(cachekey)

        with tempfile_writer(path) as fd:
            for data in content:
                LOG.debug('writing chunk of %d bytes for %s',
                          len(data), key)
                fd.write(data)
        LOG.debug('%s stored in cache', key)
708490
function Node(config) {
    RED.nodes.createNode(this,config);
    var node = this,
      message = '';

    this.on('input', function (msg) {
      node.status({});

      payloadCheck(msg)
      .then(function(){
        return wordcountCheck(msg, config);
      })
      .then(function(){
        return credentialsCheck(node);
      })
      .then(function(){
        return setEndPoint(config);
      })
      .then(function(){
        return prepareParams(msg, config);
      })
      .then(function(params){

        node.status({fill:'blue', shape:'dot', text:'requesting'});
        return executeService(msg, params);
      })
      .then(function(){
        node.status({});
        node.send(msg);
      })
      .catch(function(err){
        payloadutils.reportError(node, msg, err);
        node.send(msg);
      });
    });
  }
1154843
def attach_data(self, node):
        '''

        '''
        if self.current:
            for curr in self.current:
                md = OMPDirective(curr)
                metadata.add(node, md)
            self.current = list()
        # add a Pass to hold some directives
        for field_name, field in ast.iter_fields(node):
            if field_name in GatherOMPData.statement_lists:
                if(field and
                   isinstance(field[-1], ast.Expr) and
                   self.isompdirective(field[-1].value)):
                    field.append(ast.Pass())
        self.generic_visit(node)

        # add an If to hold scoping OpenMP directives
        directives = metadata.get(node, OMPDirective)
        field_names = {n for n, _ in ast.iter_fields(node)}
        has_no_scope = field_names.isdisjoint(GatherOMPData.statement_lists)
        if directives and has_no_scope:
            # some directives create a scope, but the holding stmt may not
            # artificially create one here if needed
            sdirective = ''.join(d.s for d in directives)
            scoping = ('parallel', 'task', 'section')
            if any(s in sdirective for s in scoping):
                metadata.clear(node, OMPDirective)
                node = ast.If(ast.Num(1), [node], [])
                for directive in directives:
                    metadata.add(node, directive)

        return node
1220268
def _write_to_cache(self, expr, res):
        """"""
        res = dedent(res)
        super()._write_to_cache(expr, res)
635939
function createNode( type, details ) {

          const node = new ast.Node( type, location() );
          if ( details === null ) return node;

          util.extend( node, details );
          return util.enforceFastProperties( node );

      }
582267
function _cacheChildren(node) {
  var children = node.get('children');
  if(children) {
    node.set('allChildren', children);
    children.forEach(_cacheChildren);
  }
}
21152
def _construct_node(loader, node, base_tag):
    ""
    node = copy.copy(node) # bypass YAML anti recursion
    best_tag = base_tag
    best_fit = 0
    for key, val in loader.DEFAULT_TAGS.iteritems():
        lenk = len(key)
        if lenk <= best_fit:
            continue
        if base_tag.startswith(key):
            best_tag = val + base_tag[lenk:]
            best_fit = lenk
    node.tag = best_tag
    return loader.construct_object(node, deep=True)
868385
private function createCachePluginNode()
    {
        $builder = new TreeBuilder('config');
        // Keep compatibility with symfony/config < 4.2
        if (!method_exists($builder, 'getRootNode')) {
            $config = $builder->root('config');
        } else {
            $config = $builder->getRootNode();
        }

        $config
            ->fixXmlConfig('method')
            ->fixXmlConfig('respect_response_cache_directive')
            ->addDefaultsIfNotSet()
            ->validate()
                ->ifTrue(function ($config) {
                    // Cannot set both respect_cache_headers and respect_response_cache_directives
                    return isset($config['respect_cache_headers'], $config['respect_response_cache_directives']);
                })
                ->thenInvalid('You can\'t provide config option "respect_cache_headers" and "respect_response_cache_directives" simultaniously. Use "respect_response_cache_directives" instead.')
            ->end()
            ->children()
                ->scalarNode('cache_key_generator')
                    ->info('This must be a service id to a service implementing '.CacheKeyGenerator::class)
                ->end()
                ->integerNode('cache_lifetime')
                    ->info('The minimum time we should store a cache item')
                ->end()
                ->integerNode('default_ttl')
                    ->info('The default max age of a Response')
                ->end()
                ->enumNode('hash_algo')
                    ->info('Hashing algorithm to use')
                    ->values(hash_algos())
                    ->cannotBeEmpty()
                ->end()
                ->arrayNode('methods')
                    ->info('Which request methods to cache')
                    ->defaultValue(['GET', 'HEAD'])
                    ->prototype('scalar')
                        ->validate()
                            ->ifTrue(function ($v) {
                                /* RFC7230 sections 3.1.1 and 3.2.6 except limited to uppercase characters. */
                                return preg_match('/[^A-Z0-9!#$%&\'*+\-.^_`|~]+/', $v);
                            })
                            ->thenInvalid('Invalid method: %s')
                        ->end()
                    ->end()
                ->end()
                ->scalarNode('respect_cache_headers')
                    ->info('Whether we should care about cache headers or not [DEPRECATED]')
                    ->beforeNormalization()
                        ->always(function ($v) {
                            @trigger_error('The option "respect_cache_headers" is deprecated since version 1.3 and will be removed in 2.0. Use "respect_response_cache_directives" instead.', E_USER_DEPRECATED);

                            return $v;
                        })
                    ->end()
                    ->validate()
                        ->ifNotInArray([null, true, false])
                        ->thenInvalid('Value for "respect_cache_headers" must be null or boolean')
                    ->end()
                ->end()
                ->variableNode('respect_response_cache_directives')
                    ->info('A list of cache directives to respect when caching responses')
                    ->validate()
                        ->always(function ($v) {
                            if (is_null($v) || is_array($v)) {
                                return $v;
                            }

                            throw new InvalidTypeException();
                        })
                    ->end()
                ->end()
            ->end()
        ;

        $cache = $builder->root('cache');
        $cache
            ->canBeEnabled()
            ->info('Configure HTTP caching, requires the php-http/cache-plugin package')
            ->addDefaultsIfNotSet()
            ->validate()
                ->ifTrue(function ($v) {
                    return !empty($v['enabled']) && !class_exists(CachePlugin::class);
                })
                ->thenInvalid('To use the cache plugin, you need to require php-http/cache-plugin in your project')
            ->end()
            ->children()
                ->scalarNode('cache_pool')
                    ->info('This must be a service id to a service implementing '.CacheItemPoolInterface::class)
                    ->isRequired()
                    ->cannotBeEmpty()
                ->end()
                ->scalarNode('stream_factory')
                    ->info('This must be a service id to a service implementing '.StreamFactory::class)
                    ->defaultValue('httplug.stream_factory')
                    ->cannotBeEmpty()
                ->end()
            ->end()
            ->append($config)
        ;

        return $cache;
    }
1009335
function(html, current, position) {

      var x, newNode, node, firstChild;

      // create a new node
      newNode = document.createElement('div');
      newNode.innerHTML = html;

      // get new new node
      newNode = newNode.childNodes[0];

      // create new node in mirror
      if (position == 'before') {

        // insert element
        current.parentNode.insertBefore(newNode, current);

      }

      // re-init sortable
      hashedit.setupSortable();

      return newNode;

    }
941028
def _init_caches(self):
        from collections import defaultdict
        from .cache import Cache, NodesCache, EdgesCache
        self._where_cached = defaultdict(list)
        self._global_cache = self.query._global_cache = {}
        self._node_objs = node_objs = WeakValueDictionary()
        self._get_node_stuff = (node_objs, self._node_exists, self._make_node)
        self._edge_objs = edge_objs = WeakValueDictionary()
        self._get_edge_stuff = (edge_objs, self._edge_exists, self._make_edge)
        for k, v in self.query.global_items():
            if k == 'branch':
                self._obranch = v
            elif k == 'turn':
                self._oturn = int(v)
            elif k == 'tick':
                self._otick = int(v)
            else:
                self._global_cache[k] = v
        self._childbranch = defaultdict(set)
        """"""
        self._branches = {}
        """Start time, end time, and parent of each branch"""
        self._branch_parents = defaultdict(set)
        """Parents of a branch at any remove"""
        self._turn_end = defaultdict(lambda: 0)
        """Tick on which a (branch, turn) ends"""
        self._turn_end_plan = defaultdict(lambda: 0)
        """Tick on which a (branch, turn) ends, even if it hasn't been simulated"""
        self._graph_objs = {}
        self._plans = {}
        self._branches_plans = defaultdict(set)
        self._plan_ticks = defaultdict(lambda: defaultdict(list))
        self._time_plan = {}
        self._plans_uncommitted = []
        self._plan_ticks_uncommitted = []
        self._graph_val_cache = Cache(self)
        self._graph_val_cache.setdb = self.query.graph_val_set
        self._graph_val_cache.deldb = self.query.graph_val_del_time
        self._nodes_cache = NodesCache(self)
        self._nodes_cache.setdb = self.query.exist_node
        self._nodes_cache.deldb = self.query.nodes_del_time
        self._edges_cache = EdgesCache(self)
        self._edges_cache.setdb = self.query.exist_edge
        self._edges_cache.deldb = self.query.edges_del_time
        self._node_val_cache = Cache(self)
        self._node_val_cache.setdb = self.query.node_val_set
        self._node_val_cache.deldb = self.query.node_val_del_time
        self._edge_val_cache = Cache(self)
        self._edge_val_cache.setdb = self.query.edge_val_set
        self._edge_val_cache.deldb = self.query.edge_val_del_time
1035050
def glue(data, options = {})
      template = partial_or_block(data, options) { yield }
      @template.add_node Nodes::Glue.new(template)
    end
1037072
private void fillCache()
   {
      Collection<NodeTypeData> ntTypes = registry.getAllNodeTypes();
      for (NodeTypeData nodeTypeData : ntTypes)
      {
         nodeTypeRegistered(nodeTypeData.getName());
      }
   }
1152884
function createCache(array) {
    var index = -1,
        length = array.length;

    var cache = getObject();
    cache['false'] = cache['null'] = cache['true'] = cache['undefined'] = false;

    var result = getObject();
    result.array = array;
    result.cache = cache;
    result.push = cachePush;

    while (++index < length) {
      result.push(array[index]);
    }
    return cache.object === false
      ? (releaseObject(result), null)
      : result;
  }