Forum Discussion
Robert_Reznicek
Nimbostratus
Apr 15, 2010Assigning array to another array
Hello, is it somehow possible to fill one array (temporary) and then assign this whole array to another array? I would need to do something like this:
set tempArr(x1) "valueA"
set tempArr(x2) "valueB"
.
.
unset ::arr
set ::arr tempArr
unset tempArr
I need this, because there are thousands of entries in the array and filling the target array directly would take too much time.
Or is there any other possibility how to solve this? Thank you8 Replies
Sort By
- hoolio
Cirrostratus
Hi Robert, - Robert_Reznicek
Nimbostratus
Hi Aaron, - hoolio
Cirrostratus
What are you doing with the URLs in the array? Are you using them for URI based persistence for web caches? If so, you might be better off using CARP like persistence: - Robert_Reznicek
Nimbostratus
I'm using these URLs for matching the correct backend servers. I took this ProxyPass iRule: http://devcentral.f5.com/Wiki/default.aspx/iRules/proxypass.html and rewrote it, so the connection is forwarded directly to backend server, rather then to assigned pool. I also modified matching of the correct server - I'm using array, rather then the external datagroup file (because of performance issues)key name item1 item2 external_url {internal_url internal_host_ip }
- hoolio
Cirrostratus
Okay, I understand a bit more on the scenario and your question: - Robert_Reznicek
Nimbostratus
Thank you guys, this is exactly what I needed to know.external_host1/path1 internal_host1 node_IP external_host1/path2/levelX internal_host2 node_IP external_host1/path3 internal_host3 node_IP
... set url_host [HTTP::host] set url_path [URI::path [HTTP::uri]] ... set url $url_host$url_path ... if {[info exists ::ppass($url)]} { log local0. "DEBUG: Found" set line $::ppass($url) } else { ...
- hoolio
Cirrostratus
- Robert_Reznicek
Nimbostratus
Hi Aaron,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects