{"id":19892120,"url":"https://github.com/dimitrovvlado/o11n-plugin-cache","last_synced_at":"2026-02-05T05:33:13.743Z","repository":{"id":217822186,"uuid":"61719925","full_name":"dimitrovvlado/o11n-plugin-cache","owner":"dimitrovvlado","description":"Cache plug-in for vRealize Orchestrator","archived":false,"fork":false,"pushed_at":"2019-02-26T07:14:12.000Z","size":12306,"stargazers_count":12,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-14T09:08:24.339Z","etag":null,"topics":["hazelcast","locking","map","queue","vrealize-orchestrator","vro"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimitrovvlado.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-06-22T13:07:35.000Z","updated_at":"2024-03-22T05:10:01.000Z","dependencies_parsed_at":"2024-01-18T12:16:24.808Z","dependency_job_id":null,"html_url":"https://github.com/dimitrovvlado/o11n-plugin-cache","commit_stats":null,"previous_names":["dimitrovvlado/o11n-plugin-cache"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dimitrovvlado/o11n-plugin-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrovvlado%2Fo11n-plugin-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrovvlado%2Fo11n-plugin-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrovvlado%2Fo11n-plugin-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrovvlado%2Fo11n-plugin-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimitrovvlado","download_url":"https://codeload.github.com/dimitrovvlado/o11n-plugin-cache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrovvlado%2Fo11n-plugin-cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29113660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T05:31:32.482Z","status":"ssl_error","status_checked_at":"2026-02-05T05:31:29.075Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hazelcast","locking","map","queue","vrealize-orchestrator","vro"],"created_at":"2024-11-12T18:21:34.976Z","updated_at":"2026-02-05T05:33:13.716Z","avatar_url":"https://github.com/dimitrovvlado.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cache plug-in for vRealize Orchestrator\nThe Cache plug-in for vRealize Orchestrator is a a plug-in which provides distributed in-memory data structures such as maps, queues sets etc.\n\nBasic features of the plug-in:\n\n * Distributed in-memory data structures with TTL/lease options\n * Distributed unique ID generation\n * Distributed locking\n * Automatic auto-discovery with other vRO nodes which belong to the cluster\n\n### Plugin download\n[o11nplugin-cache-1.0.0.vmoapp](https://github.com/dimitrovvlado/o11n-plugin-cache/blob/master/dist/o11nplugin-cache.vmoapp?raw=true) \n\n### Supported platform version\nThe Cache plug-in supports vRO 6.0 and later.\n\n### Sample scripting\n\n#####Using lists:\n```javascript\n//Add a value in the default list\nCacheManager.listService.add(\"my-value\");\n\n//Get the first value from the list\nvar value = CacheManager.listService.get(0);\n\n//Clear the default list\nCacheManager.listService.clear();\n```\n\n#####Using sets:\n```javascript\n//Add a value in the default set\nCacheManager.setService.add(\"my-value\");\n\n//Get the elements from the default set\nvar elements = CacheManager.setService.elements();\n\n//Clear the default set\nCacheManager.setService.clear();\n```\n\n#####Using maps:\n```javascript\n//Put a value in the default map without TTL\nCacheManager.mapService.put(\"my-key\", \"my-value\");\n\n//Put a value in the default map with a TTL of 2 minutes\nCacheManager.mapService.put(\"my-key\", \"my-other-value\", 2, CacheTimeUnit.MINUTES);\n\n//Get the value from the map\nvar value = CacheManager.mapService.get(\"my-key\");\n```\n\n#####Using queues:\n```javascript\n//Offer a value in the default queue, waiting up to 2 minutes if necessary for space to become available\nCacheManager.queueService.offer(\"my-value\", 2, CacheTimeUnit.MINUTES);\n\n//Offer a value in the default queue, waiting if necessary for space to become available\nCacheManager.queueService.offer(\"my-value\");\n\n//Poll a value from the default queue\nvar value = CacheManager.queueService.poll();\n\n//Put a value from the default queue, waiting if necessary for space to become available\nCacheManager.queueService.put(\"my-value\");\n\n//Retrieve and remove the head of the queue. Throws an exception if queue is empty\nval value = CacheManager.queueService.remove();\n```\n\n#####Using ring buffers:\n```javascript\n//Adds an item to the tail of the ringbuffer \nCacheManager.ringbufferService.add(\"my-value\");\n//Get the sequence of the head\nvar sequence = CacheManager.ringbufferService.headSequence();\nwhile(true){\n    //Reads the item from the ringbuffer\n    var item = CacheManager.ringbufferService.readOne(sequence);\n    sequence++;\n}\n```\n\n#####Using ID generators:\n```javascript\n//Create a unique ID with the default generator\nvar id = IdGeneratorManager.idGeneratorService.newId();\n\n//Create a unique ID with a named ID generator\nvar id = IdGeneratorManager.idGeneratorService.newIdForGenerator(\"my-id-generator\");\n```\n\n#####Using locks:\n```javascript\n//Acquires a lock by current workflow token id for 2 minutes\nLockManager.lockService.lock(workflow.id, 2, CacheTimeUnit.MINUTES);\n\n//Releases the lock. Will fail if invoked from another workflow\nLockManager.lockService.unlock(workflow.id);\n\n//Tries to acquire a lock if it is free within 10 seconds. Returns true if succeeded\nvar result = LockManager.lockService.tryLock(workflow.id, 10, CacheTimeUnit.SECONDS);\n\n//Tries to acquire a lock for 2 minutes, if it is free within 10 seconds. Returns true if succeeded\nvar resut = LockManager.lockService.tryLockWithLease(workflow.id, 10, CacheTimeUnit.SECONDS, 2, CacheTimeUnit.MINUTES);\n```\n\n### Dependencies\nThe Cache plug-in for vRO uses the following third-party libraries:\n* [Hazelcast](https://hazelcast.com/) - an in-memory data grid middleware, distributed under the Apache License, Version 2.0.\n* [Google Guava](https://github.com/google/guava) - core libraries for Java-based projects, distributed under the Apache License, Version 2.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitrovvlado%2Fo11n-plugin-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimitrovvlado%2Fo11n-plugin-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitrovvlado%2Fo11n-plugin-cache/lists"}